| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. Listbox #13112 | How can I select and highlight a listbox entry in my script before displaying the initial screen? GeorgeGeorge | 2. This is how I do it with one of my scripts #13113 |
insert_progress_list:
USE ARG string
guisendmsg('progress_list', 'ADDSTRING', , string)
guigetmsg('CLEAR')
count = count + 1
progress_list = count
guisetctlvalue('progress_list')
RETURN 0
This presupposes that you have defined your list with
LIST 14, 62, 504, 246, NOTIFY|REALHEIGHT|KEYS|BORDER|VSCROLL|TABSTOP, INDEX, progress_list
By doing the guisetctlvalue above, you're saying "highlight the count'th row of the the list". If you don't have the index option, then you need to know the contents of the row (and for my progress lists, that's highly unlikely) | 3. #13114 | Thanks, this solved my problem. George | 4. #13115 | Is it possible to access the "text" in a listbox after defining it with the INDEX option? George | 5. How do you mean ? #13116 | Where has the data for the listbox come from ? | 6. #13117 | I'm using the following statements to load the listbox (Listfiles).
error = GuiSendMsg("Listfiles", "DIR",, "!*.txt") error = GuiSendMsg("Listfiles", "DIR",, "~*.txt") error = GuiSendMsg("Listfiles", "InsertString",,"~None")
error = guisetctlplacement('Listfiles')
Thanks,George | 7. #13118 | Yes, but you need to know the line number you want (where the first line is 1, the second line is 2, etc). Send the GETLBTEXT message with GuiSendMsg, and pass the line number, and the quoted name of a variable where you want the text returned.
linenum = 1
guisendmsg("Listfiles", "GETLBTEXT", linenum, "MYVARIABLE")
SAY myvariable | 8. #13119 | Great! George | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|