Jump to content

GUICtrlCreateList


yucatan
 Share

Recommended Posts

hi i have a problem with my GUICtrlCreateList the problem is that i cant set data that is already exsisting

when i do

GUICtrlSetData($list,"yucatan")

GUICtrlSetData($list,"yucatan2")

GUICtrlSetData($list,"yucatan3")

GUICtrlSetData($list,"yucatan4")

i get this in my list

yucatan

yucatan2

yucatan3

yucatan4

when i do

GUICtrlSetData($list,"yucatan")

GUICtrlSetData($list,"yucatan")

GUICtrlSetData($list,"yucatan")

GUICtrlSetData($list,"yucatan")

i should get this

yucatan

yucatan

yucatan

yucatan

but i get this

yucatan

so i cant add some data that is already exsisting i already looked in the help file i runned the explame of guictrlcreatelist

but in the sample it works and in my gui it dont i have already looked for things that are different but i cant find it pleas some help

Edited by yucatan
Link to comment
Share on other sites

omg wtf lol it WORKED LOLLL stange... but realy realy thx mate

hi i have a question is it posseble to count the data's in a guictrlcreatelis b.v. when i selected the 4th value that i click a button that its shows that i select the fourth value ??

Link to comment
Share on other sites

_GUICtrlListView_GetSelectedIndices() and _GUICtrlListView_InsertItem() should help you. Look in the help file under UDF's and GUIListView Management

Oh and if you do this...

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

They should all be on new lines and not overwrite each other I beleive. The "|" is the default delimiter in list views and gives them new lines.

Edited by SoulA
Link to comment
Share on other sites

_GUICtrlListView_GetSelectedIndices() and _GUICtrlListView_InsertItem() should help you. Look in the help file under UDF's and GUIListView Management

Oh and if you do this...

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

GUICtrlSetData($list,"yucatan|")

They should all be on new lines and not overwrite each other I beleive. The "|" is the default delimiter in list views and gives them new lines.

is it posseble to hide some data in data b.v. Yucatan&3|

that you only see the Yucatan but when u do a GUICtrlRead that i can see the &3

this is the problem

i need to create a listview something for a inbox system so i need to be able to show 2 times the samen but when i click it i need to see message one or message 2

maby i need to use another system to show my inbox if u guys know something bether pleas say it

my messages is a from a to a subject and a message ofcourse

Link to comment
Share on other sites

I'm not entirely sure if I am answering your question but this is my attempt.

I think you want to output something to a list twice but have a msg be different for either of those things output.

My suggestion to you is to use _GUICtrlListView_InsertItem() or_GUICtrlListView_SetItemParam or _GUICtrlListBox_SetItemData() to give either of those things in the list their own data.

In the case of _GUICtrlListView_InsertItem() or _GUICtrlListView_SetItemParam you set that data to the param and use this type of code structure.

$index= _GUICtrlListView_GetSelectedIndices($listview)

$param = _GUICtrlListView_GetItemParam($listview, $index) or msgbox(0,"test", _GUICtrlListView_GetItemParam($listview, $index))

This should give you the hidden data you seek.

After that with the param = 1 you output msgbox 1 of if the param = 2 output msgbox 2 and so on...

Again this is all in the help file... going through the UDF's would give you this info

Edited by SoulA
Link to comment
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
 Share

  • Recently Browsing   0 members

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