We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ListView issues by use LDDatabase.AddListView
#1
Hello everyone,

I have the following problem:
I create a ListView in a program using

LV = LDDataBase.AddListView(Width, Height)

With

LDControls.ListViewSelectionChanged = ListViewSelectionChanged 

the subroutine ListViewSelectionChanged is supposed to be called when a row in the ListView is selected.

With
DBQuerry = LDDataBase.Query(DB, "Select * from " + TableName[BP], LV, "True") 
I fill the ListView with all values from the defined table. Two records are present.
The program parts look like this:
SVSC = "False" 
LDFocus.SetFocus(TBInput[1][InputText[1]]) 
Running = "True" 
While Running = "True" 
Program.Delay(20) 
CheckButtonPressed() 
CheckListViewSelect() 
EndWhile 
Program.End()
Sub CheckListViewSelect 
If SVSC = "True" Then 
SelectedRow = LDControls.LastListViewRow 
TextWindow.WriteLine(SelectedRow) 
LVValues = LDControls.ListViewGetRow(LV, SelectedRow) 
TextWindow.WriteLine(LVValues) 
SVSC = "False" 
TextWindow.WriteLine("CheckListViewSelect " + SVSC) 
EndIf 
EndSub
Sub ListViewSelectionChanged 
SVSC = "True" 
TextWindow.WriteLine("ListViewSelectionChanged " + SVSC) 
EndSub
Nothing is printed in CheckListViewSelect.
Does it not work because the ListView was defined using
LV = LDDataBase.AddListView(Width, Height) 
?
LitDev, could you please check this and possibly provide a solution?
Thank you
Martin
Show program GXMV538.000
Reply


Messages In This Thread
ListView issues by use LDDatabase.AddListView - by martmen - 06-08-2026, 04:39 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)