therks Posted June 3, 2004 Posted June 3, 2004 So I've got this window setup, you click a button, choose a text file, and the contents are loaded into a list box. I currently percieve two problems: 1) Entering lines into a listbox is done via a single string with all the values joined by | characters. What if I wanted to put the | character in one of my entries? 2) It auto-sorts the lines alphabetically. Looking at the styles applicable to lists, I see two entries that force the list to sort, but none that force it not to. Are there any ways around these? My AutoIt Stuff | My Github
CyberSlug Posted June 3, 2004 Posted June 3, 2004 (edited) 2) When you call GuiSetControl, using a style of 0x0 will make the list unsorted--but that might clear other custom styles regarding scroll bars, etc.... I really with unsorted were the default...1) You might try:ControlCommand ( "title", "", "ListBox1", "AddString", "your|text|here")You might have to call GuiShow() prior to this command.See help file for ControlCommand paramters. There is probably a better way to do this with GuiSendMsg, but I don't know the right parameters off the top of my head.... Edited June 3, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
therks Posted June 3, 2004 Author Posted June 3, 2004 Awesome, thanks a bunch for the help. My AutoIt Stuff | My Github
kalayaan Posted June 3, 2004 Posted June 3, 2004 CS, I saw in one of your posts somewhere that the 0x200000 style makes visible the vertical scrollbar, but I can't seem to find one for the horizontal scrollbar so that when contents lor a listbox exceed the horizontal size, the scrollbar appears. I tried 0x100000 along with 0x200000 but no dice. Thanks.
bobheart Posted June 3, 2004 Posted June 3, 2004 CS, I saw in one of your posts somewhere that the 0x200000 style makes visible the vertical scrollbar, but I can't seem to find one for the horizontal scrollbar so that when contents lor a listbox exceed the horizontal size, the scrollbar appears. I tried 0x100000 along with 0x200000 but no dice. Thanks.Try this . $ES_READONLY = 0x800; $WS_DISABLED = 0x8000000; $WS_VSCROLL = 0x200000; $WS_HSCROLL = 0x100000;
kalayaan Posted June 3, 2004 Posted June 3, 2004 @bobheart, I'm afraid 0x100000 doesn't work, it doesn't show the horizontal scrollbar even if a listbox entry's length exceeds that of the listbox. Works if the control is an edit box. Probably a limitation of listboxes. Could you confirm if this is so? I'm trying to list filenames with their complete paths in the listbox and there is no way to scroll to the end of the entry and see the filename. Would appreciate any tip. Thanks.
bobheart Posted June 3, 2004 Posted June 3, 2004 I used it in my small notes you can see here .http://www.autoitscript.com/forum/index.php?showtopic=2661Bu it has changed a lot as you can see by all the post .
Valik Posted June 3, 2004 Posted June 3, 2004 Add $WS_HSCROLL to the styles and use GuiSetControlEx to set the horizontal extent for a listbox.
kalayaan Posted June 3, 2004 Posted June 3, 2004 (edited) Whoopeee! That did it. Thanks, Valik! @bobheart, thanks for the suggestions too, man. Edited June 3, 2004 by kalayaan
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now