Sign in to follow this  
Followers 0
TJsmart

Add array to combobox

4 posts in this topic

Hiya!

Im trying to get my list of processes into a combobox, so far I've managed to get the proceslist into my array and filtered it so it's only processes with windows (from help file)

I tried:

$dropbutton = GUICtrlCreateCombo("", 10, 10) ; create first item

GUICtrlSetData(-1, $droplist) ; add other item snd set a new default

GUISetState()

But nothing happens.

Is it not possible to get my array into the combobox? Do I have to convert it to a string first? like array --> "item1,item2,item3,item4" to get it into the combobox?

Share this post


Link to post
Share on other sites



Hiya!

Im trying to get my list of processes into a combobox, so far I've managed to get the proceslist into my array and filtered it so it's only processes with windows (from help file)

I tried:

$dropbutton = GUICtrlCreateCombo("", 10, 10) ; create first item

GUICtrlSetData(-1, $droplist) ; add other item snd set a new default

GUISetState()

But nothing happens.

Is it not possible to get my array into the combobox? Do I have to convert it to a string first? like array --> "item1,item2,item3,item4" to get it into the combobox?

[fixed]

Converted my array to string and now it works:

For $i = 1 to $var[0][0]

; Only display visble windows that have a title

If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then

$dropstring = $dropstring & $var[$i][0] & "|"

EndIf

Next

......

$Application = GUICtrlCreateCombo("",100,11, 300,20)

GUICtrlSetData(-1, $dropstring) ; add other item snd set a new default

GUISetState()

Share this post


Link to post
Share on other sites

I'm not sure why you reported your own post. Further misuse of the report feature will see you removed from this forum.

Share this post


Link to post
Share on other sites

I'm not sure why you reported your own post. Further misuse of the report feature will see you removed from this forum.

Strange reaction...

I reported because I could not change the title of the thread and proposed a [solved] thingie.

But I guess you did not read that far.

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