Jump to content

Recommended Posts

Posted

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?

Posted (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 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!
Posted

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.

Posted

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;
Posted

@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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...