Apart from me having to read a text file line by line and using the listbox.additem(...) function, is there another way or a better way to do this. Like with datawindow we can use the importfunction. Infact are there any free activeX control that can be used???
not for a listbox... your would have to loop through your result set using probably a fetch or retrieving into a datastore and looping through that....but I guess the point would be.. what functionality are you gaining by using a listbox?
Maybe Sybase thought it was not worth it offering an ImportFile() function for a ListBox. It would have been nice to have it natively in PowerBuilder but you can write it yourself - reading and adding each line as an item in the listbox. See Help on FileOpen, FileRead, FileClose... functions. And if you declare this in your ancestor listbox, it is always available. As you know, a listbox can offer you only one column's data compared to a datawindow/datastore that can support multiple columns, dropdown-edit style, ShareData()...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.