Jump to content
Sign in to follow this  
leander

help me with controlListView

Recommended Posts

leander

anyone know how to make ControlList view like this...

ID Name Money Set

0 A 1000

1 B 1500

2 C 1200

example if C reach money 2000 then i want to Set " X"....

anyone can help me with this controlListview....

Share this post


Link to post
Share on other sites
BrewManNH

I'm afraid you are going to need to provide a lot more information that what you posted.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
leander

I'm afraid you are going to need to provide a lot more information that what you posted.

please brewmanh if u know please teach me...

Im just make it...like this...

Global $GUI_Form1 = GUICreate("Data", 412, 461, 474, 211)
Global $ListView_PersonData = GUICtrlCreateListView("ID|Name|Money|Set", 20, 82, 370, 254)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 0, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 1, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 2, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 3, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 4, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 5, 50)
GUICtrlSendMsg($ListView_PersonData, 0x101E, 6, 50)

HotKeySet("^!+m", "_Set_X")
Func _Set_X()
$Select = _get_Selected_PersonData()
If @error Then
Tooltip("SelectData : @error = " & @error)
Return False
Else
Tooltip("SelectData : " & $Select[1] & " | " & $Select[2] )
EndIf

???????????? >>>>>>> i dont know how to look again in control view if money 2000 then call _set_Selected_PersonData(X)
EndFunc ;==>_SetX

Func _get_Selected_PersonData()
;Read The currently Selected ListView Item from PersonData
Local $selectedPersonDataItem_ID = ControlListView($GUI_Form1, "", $ListView_PersonData, "GetSelected")
Local $selectedPersonDataItem = _get_PersonData($selectedPersonDataItem_ID)
SetError(@error)

Return $selectedPersonDataItem
EndFunc ;==>_get_Selected_PersonData

Func _get_PersonData($ID)
Local $subItemCount = ControlListView($GUI_Form1, "", $ListView_PersonData, "GetSubItemCount")
Local $selectedDataItem[$subItemCount + 1]
For $i = 0 To $subItemCount
$selectedPersonDataItem[$i] = ControlListView($GUI_Form1, "", $ListView_PersonData, "GetText", $ID, $i)
Next
If @error Then
SetError(1)
Return 0
EndIf

Return $selectedPersonDataItem
EndFunc ;==>_get_PersonData

Func _set_Selected_PersonData($set)
Local $selectedPersonDataItem_ID = ControlListView($GUI_Form1, "", $ListView_PersonData, "GetSelected")
tooltip("Set X at PersonData ID = " & $selectedPersonDataItem_ID & " @error = " & @error)
If @error Then
Return False
EndIf
Local $Item_handle = ControlGetHandle($GUI_Form1, "", $ListView_PersonData)
If @error Then
Return False
EndIf
Local $result = _GUICtrlListView_SetItem($Item_handle, $set, $selectedPersonDataItem_ID,3)
EndFunc ;==>_set_Selected_PersonData
Edited by leander

Share this post


Link to post
Share on other sites
JLogan3o13

Hi, leander. What program is this for? There may be a much easier way to accomplish what you're trying to do.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
BrewManNH

I looked at the source code and I still have no idea what it is you're trying to do. Also, do you have any code that works because that script doesn't work at all. Even after fixing it so I could get it to display anything, it still has numerous errors.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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  

×