Sign in to follow this  
Followers 0
Bru

List Help

7 posts in this topic

This is probably really simple,

I've searched, couldn't find anything.

But..

I am using a List.

$List1 = GUICtrlCreateList("", 8, 40, 217, 227)

Adding a line to the List is fine, but it adds it in alpha order.

How could i add it so the index is 0. So it adds the new item to the top?

Thanks in advance.


[right] [/right]

Share this post


Link to post
Share on other sites



List without LBS_SORT?

Share this post


Link to post
Share on other sites

Thanks for that,

I get this error,

D:\Programming\AU3\oExcuse Generator\oExcuse Generator.au3 (9) : ==> Variable used without being declared.:

$List1 = GUICtrlCreateList("", 8, 40, 241, 201, $WS_BORDER)

$List1 = GUICtrlCreateList("", 8, 40, 241, 201, ^ ERROR

Please may someone help me out?

Thanks in advance.


[right] [/right]

Share this post


Link to post
Share on other sites

Next time search it in the help file in the search tab ;] the first few results will probably tell you what or who lol.

Anyway, include <WindowsConstants.au3>.

Share this post


Link to post
Share on other sites

Ahh crap.

I searched for GUICtrlCreateList,

And thought i had to include <GUIConstantsEx.au3>

Aha,

Thanks mate.


[right] [/right]

Share this post


Link to post
Share on other sites

Ahhhh crap...

Why won't it add to the top of the list, instead it adds to the bottom :@

Sorry about all this.

Thanks,


[right] [/right]

Share this post


Link to post
Share on other sites

_GUICtrlListBox_InsertString, it requires a handle to the control but GuiCtrlCreateList return the control ID so first get it's handle using GuiCtrlGetHandle and then call the aforementioned function with this handle.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0