Page 1 of 1

Load content into a ListBox

PostPosted: Sat Sep 14, 2013 1:40 pm
by AsleyCruz
Hi Guys :)
Please, help me in something...
How can I load Fields and add it into a ListBox?

Hope you can help me... thank you very much! :wink:

You can see the pic for more information:
Image

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 2:09 pm
by mishem
Code: Select all
dbpShowAll "MyDB" "Tabl"
Loop "1" "[MyDB.Tabl.$RecCount]" "[i]"
  dbpGotoRecord "MyDB" "Tabl" "[i]"
  SetVar "[Temp]" "[Temp][MyDB.Tabl.FirstName][#32][MyDB.Tabl.LastName][#13][#10]"
EndLoop
SetObjectCaption "ListBox" "[Temp]"

OR


ListBoxAddItem "ListBox" "0" "[Temp]"

OR

SetVar "[ListBox]" "[Temp]"

OR

etc.

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 2:14 pm
by mishem
Forgot to write a single line.
Corrected.
:)

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 2:27 pm
by AsleyCruz
mishem wrote:Forgot to write a single line.
Corrected.
:)


Hi mishem!
Just one thing more... is there any way to select the item in the "ListBox" like this example?:
- ListBoxSelectItem

When I do click in the button "Next record" I would like that in the "ListBox" the item correct be selected.

Many thanks for you answer... irt helped me a lot :wink:

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 2:56 pm
by mishem
Code: Select all
dbpNext "MyDB" "Tabl"

ListBoxFindItem "ListBox" "[MyDB.Tabl.FirstName][#32][MyDB.Tabl.LastName]" "[Result]"

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 3:01 pm
by AsleyCruz
mishem wrote:
Code: Select all
dbpNext "MyDB" "Tabl"

ListBoxFindItem "ListBox" "[MyDB.Tabl.FirstName][#32][MyDB.Tabl.LastName]" "[Result]"


I thought so!
That's what I get for not reading well :P
1000 Thanks again ;)

Re: Load content into a ListBox

PostPosted: Sat Sep 14, 2013 3:08 pm
by mishem

Re: Load content into a ListBox

PostPosted: Sun Sep 15, 2013 8:10 pm
by AsleyCruz


Thanks mishem ;-)
Sure!