bf2forlife Posted May 29, 2008 Posted May 29, 2008 (edited) When my script tries to write on $List1 = GUICtrlCreateListView ("SOMETHING |",8,10,813,300) Then it writes it on that at same place as SOMETHING, not in the white box. How i can fix this? Here is the other code GUICtrlSetData($List1, $string) Edited May 29, 2008 by bf2forlife
sandin Posted May 29, 2008 Posted May 29, 2008 have you tried GUICtrlCreateListViewItem() ? Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
PsaltyDS Posted May 29, 2008 Posted May 29, 2008 (edited) When my script tries to write on $List1 = GUICtrlCreateListView ("SOMETHING |",8,10,813,300) Then it writes it on that at same place as SOMETHING, not in the white box. How i can fix this? Here is the other code GUICtrlSetData($List1, $string) GuiCtrlSetData() can only change an individual ListViewItem. Items are added With GuiCtrlCreateListViewItem(). If you add more items, save the control IDs to those items and you can change them individually with GuiCtrlSetData(): #include <GuiConstants.au3> $hGUI = GUICreate("Test", 640, 480) Global $avLVItems[10] $avLVItems[0] = GUICtrlCreateListView(" ", 20, 20, 600, 390) For $n = 1 To UBound($avLVItems) - 1 $avLVItems[$n] = GUICtrlCreateListViewItem("Old Item " & $n, $avLVItems[0]) Next $ctrlButton = GUICtrlCreateButton("CHANGE", 270, 430, 100, 30) GUISetState() $iChangeItem = 1 $iMultiplier = 2 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $ctrlButton GUICtrlSetData($avLVItems[$iChangeItem], "New Item " & $iChangeItem * $iMultiplier) $iChangeItem += 1 If $iChangeItem > UBound($avLVItems) - 1 Then $iChangeItem = 1 $iMultiplier += 1 EndIf EndSwitch WEnd P.S. The little square boxes inside your first item were there because you have hard Tabs in your text parameter. Use spaces instead to set the initial column width. Edited May 29, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now