Treeview Row Height
- PuzzledGreatly
- Posts: 1303
- Joined: 29 Sep 2013, 22:18
Treeview Row Height
Following the example in the help file I've managed to create a treeview but is there anyway to make the height of each row taller? This is to make it easier for fat fingers using a touchscreen to select an item in the treeview. Thanks.
- PuzzledGreatly
- Posts: 1303
- Joined: 29 Sep 2013, 22:18
Re: Treeview Row Height
Thanks, I followed the link but still can't understand how to use TVM_SETITEMHEIGHT. What would I need to do if, for example, I wanted to make each line 50 pixels high?
Re: Treeview Row Height
You have to send the message to the TreeView control (SendMessage).
Modified sample from the help file:
Modified sample from the help file:
Code: Select all
#NoEnv
TVM_SETITEMHEIGHT := 0x111B
ItemsHeight := 50 ; pixels
Gui, Add, TreeView, hwndHTV ; added hwnd option
P1 := TV_Add("First parent")
P1C1 := TV_Add("Parent 1's first child", P1) ; Specify P1 to be this item's parent.
P2 := TV_Add("Second parent")
P2C1 := TV_Add("Parent 2's first child", P2)
P2C2 := TV_Add("Parent 2's second child", P2)
P2C2C1 := TV_Add("Child 2's first child", P2C2)
Gui, Add, Button, gChangeItemSHeight, Change Items Height ; added
Gui, Show ; Show the window and its TreeView.
return
GuiClose: ; Exit the script when the user closes the TreeView's GUI window.
ExitApp
ChangeItemsHeight:
SendMessage, %TVM_SETITEMHEIGHT%, %ItemsHeight%, 0, , ahk_id %HTV%
Return
- PuzzledGreatly
- Posts: 1303
- Joined: 29 Sep 2013, 22:18
[solved] Re: Treeview Row Height
I got it - thanks for the example, very useful.
Who is online
Users browsing this forum: Dobbythenerd1, Google [Bot] and 308 guests