| || |
About List Box
I could not retrieve listitem from the listbox when I tried to retrieve listitem from QARun Help Topics list box.
Here is the example. (QARun Help)
Select Help | Language Help from QARun Help menu.
"Help Topics: QARun Language Help" MainWindow popsup. Try to retrieve listitem from listbox. I tried so many times it could not return anything.I don't have any problem with ListBox,ListBoxFind, ListCount,ListFindItem and ListFocus. Only the problem is listitem. Need some one help.
Re: About List Box
This list control has a style of LBS_OWNERDRAWNFIXED which means that ListItem() will not be able to get the data out of the control.
If you just want the list of the items that appear in the list box you can look at the file name langhelp.cnt. It is a file used by WinHelp to displays the contents page.
Every line beginning with a "2" is a command upto the "=" sign. Try the following ...
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">filename = "langhelp.cnt"
open filename "read"
while filestatus(filename) <> 2
readline filename line
if left(line,1) = "2"
ipos = instr(line,"="
command = mid(line,3,ipos-2)
print "[" + command + "]"
wend</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">