TTMSFNCKanbanBoard change focus

OS: Debian 10 (buster) LXDE
fpc 3.3.1
lazaraus 2.1

TMS FNC UI Pack release 3.0.1.3

LCL component

TTMSFNCKanbanBoard

1.
clike items 1, clik items 2  - change focus /  work ok
Dbl click items 1, click item 2 - not change focus, again click on items 2 - change focus / not work

2. event
onDblclick: (if it changes focus it works properly)
procedure TForm1.TMSFNCKanbanBoard1DblClick(Sender: TObject);
begin
     ShowMessage(IntToStr(TMSFNCKanbanBoard1.SelectedItem.Index));
end;

onClick: (when changing focus, the real exception)
procedure TForm1.TMSFNCKanbanBoard1Click(Sender: TObject);
begin
   ShowMessage(IntToStr(TMSFNCKanbanBoard1.SelectedItem.Index));
end; 


We have tested the focus changing here and could not reproduce this. The ShowMessage that you are using might potentially interfere with the focus setting process. Please try to use a log instead to show which item is selected.

Hi,
Send video youtube:
https://youtu.be/bT-CnTOYPz8

It's really unclear from the video what exactly is going wrong. Please explain in detail, with step by step instructions what exactly is going wrong? 

Click :Build Feature A - count 1 : 0
Click: Test Feature A - count 2 : 0
Click: Test Feature B - count 3 : 0

DblClick; Test Feature B - count 4 : 1

Click: Build Feature A - count 5 : 1 ( selected  Test Feature B)

Clidk: Builed Feature A - count 6 : 1 (selected Buile Feature A)

If you want to know when a selected item changes, please use OnSelectItem instead.

OK  OnSelectItem

after double clicking, I have to double click on the second choice

Please use this code to assign an event handler to the OnItemDblClick:




procedure TForm24.DoItemDblClick(Sender: TObject; AItem: TTMSFNCTableViewItem);
var
  tbl: TTMSFNCKanbanBoardTableView;
  I: Integer;
begin
  tbl := TTMSFNCKanbanBoardTableView(Sender);
  for I := 0 to TMSFNCKanbanBoard1.Columns.Count - 1 do
  begin
    if TMSFNCKanbanBoard1.Columns.TableView = tbl then
      FMX.Types.Log.D('Column ' + I.ToString + ' ' + TMSFNCKanbanBoard1.Columns.Items[AItem.Index].Text + ' dbl clicked !');
  end;
end;


procedure TForm24.FormCreate(Sender: TObject);
var
  I: Integer;
begin
  for I := 0 to TMSFNCKanbanBoard1.Columns.Count - 1 do
    TMSFNCKanbanBoard1.Columns.TableView.OnItemDblClick := DoItemDblClick;
end;

LCL component

Click :Build Feature A - count 1 : 0
Click: Test Feature A - count 2 : 0
Click: Test Feature B - count 3 : 0

DblClick; Test Feature B - count 4 : 1 (after)

Click 1 to Build Feature A - count 5 : 1 (Selected  Test Feature B)
Click 2 to Build Feature A - count 6 : 1 (selected   Build Feature A)
send youtube and add onItemSelect

https://www.youtube.com/watch?v=N2fkRVaALIk&feature=youtu.be

pay attention after double clicking
the click counter increases and the selected data does not change

Did you USE the code snippet??

LCL component

not  TableView
(TMSFNCKanbanBoard1.Columns.TableView )

not FMX.Types.Log.

watch when the counter shows 4 and 5

count 4 : 1
and count 5: 1

Again, 


Did you use the CODE SNIPPET I suggested?

Please download and use the latest version

Today i installed the latest version and the same problem is still present.
TMSFNCUIPack v3200 - 22.09.2020

Hi,

We have further investigated and retested this here and applied a fix, the next version will address this. The fix was also related to the TTMSFNCListBox, due to the underlying TTMSFNCTreeview

thank you

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.