Page 1 of 1

[Module] TreeEx - Gadget (all OS)

Posted: Fri Dec 20, 2019 2:42 pm
by Thorsten1867
TreeEx Gadget - Module (all OS / DPI / 64Bit)

Tree Gadget with additional columns

Image

Code: Select all

; TreeEx::AddColumn()           - similar to 'AddGadgetColumn()'
; TreeEx::AddItem()             - similar to 'AddGadgetItem()'
; TreeEx::ClearItems()          - similar to 'ClearGadgetItems()'
; TreeEx::CountItems()          - similar to 'CountGadgetItems()'
; TreeEx::DisableReDraw()       - disable redraw
; TreeEx::Gadget()              - similar to 'TreeGadget()'
; TreeEx::GetItemColor()        - similar to 'GetGadgetItemColor()'
; TreeEx::GetItemData()         - similar to 'GetGadgetItemData()'
; TreeEx::GetItemState()        - similar to 'GetGadgetItemState()'
; TreeEx::GetItemText()         - similar to 'GetGadgetItemText()'
; TreeEx::GetLabelState()       - similar to 'GetGadgetItemState()', but label instead of column
; TreeEx::GetLabelText()        - similar to 'GetGadgetItemText()',  but label instead of column
; TreeEx::GetState()            - similar to 'GetGadgetState()'
; TreeEx::Hide()                - similar to 'HideGadget()'
; TreeEx::RemoveItem()          - similar to 'RemoveGadgetItem()'
; TreeEx::SaveColorTheme()      - save a custom color theme
; TreeEx::SetAutoResizeColumn() - column that is reduced when the vertical scrollbar is displayed.
; TreeEx::SetAutoResizeFlags()  - [#MoveX|#MoveY|#Width|#Height]
; TreeEx::SetColor()            - similar to 'SetGadgetColor()'
; TreeEx::SetColorTheme()       - set or load a color theme
; TreeEx::SetFont()             - similar to 'SetGadgetFont()'
; TreeEx::SetHeaderAttribute()  - set header attribute (e.g. align)
; TreeEx::SetHeaderFont()       - set header font
; TreeEx::SetItemColor()        - similar to 'SetGadgetItemColor()'
; TreeEx::SetItemData()         - similar to 'SetGadgetItemData()'
; TreeEx::SetItemImage()        - similar to 'SetGadgetItemImage()'
; TreeEx::SetItemState()        - similar to 'SetGadgetItemState()'
; TreeEx::SetItemText()         - similar to 'SetGadgetItemText()'
; TreeEx::SetLabelState()       - similar to 'SetGadgetItemState()', but label instead of column
; TreeEx::SetLabelText()        - similar to 'SetGadgetItemText()',  but label instead of column
; TreeEx::SetState()            - similar to 'SetGadgetState()'
Download: TreeExModule.pbi

Re: [Module] TreeEx - Gadget (all OS)

Posted: Mon Dec 23, 2019 10:23 pm
by Andre
Looks and works very nice, thank you for sharing! :D

Re: [Module] TreeEx - Gadget (all OS)

Posted: Fri Feb 21, 2020 9:25 pm
by mrv2k
Is there any way to detect which sub item has been selected?

*Edit - GetItemAttribute was still in the source code but not declared. I got it working but not the #SubItem constant. I'm using the #PB_TREE_SUBITEM constant at the moment.

Re: [Module] TreeEx - Gadget (all OS)

Posted: Sat Feb 22, 2020 5:44 pm
by Thorsten1867

Code: Select all

TreeEx::GetItemAttribute(#Tree, 1, TreeEx::#SubLevel) ; returns level of the item
TreeEx::GetItemState(#Tree, 1)                        ; returns state of the item (TreeEx::#Selected | TreeEx::#Checked)

Re: [Module] TreeEx - Gadget (all OS)

Posted: Sat Feb 22, 2020 7:00 pm
by mrv2k
Thanks!

I have noticed that if you have multiple nodes and expand one of them, the scroll area resizes as if you have expanded all the nodes and not to the size of the nodes you've expanded.

Re: [Module] TreeEx - Gadget (all OS)

Posted: Mon Mar 09, 2020 3:30 pm
by Thorsten1867
Update:
  • ScrollBarGadget() replaced by drawing routine
  • Attribute #ScrollBar [#ScrollBar_Default/#ScrollBar_Frame/#ScrollBar_DragPoint]
  • SetColor() -> [#ScrollBar_FrontColor/#ScrollBar_BackColor/#ScrollBar_BorderColor/#ScrollBar_ButtonColor/#ScrollBar_ThumbColor]

Re: [Module] TreeEx - Gadget (all OS)

Posted: Fri Mar 13, 2020 6:22 pm
by mrv2k
Hi Thorsten

Couple of issues with the scrollbar...

1. When you scroll up and down the bar moves faster than the mouse
2. The bar stops scrolling when the mouse moves off of the gadget.

Re: [Module] TreeEx - Gadget (all OS)

Posted: Sat Apr 04, 2020 2:19 pm
by Thorsten1867
Update: Cursor keys

Re: [Module] TreeEx - Gadget (all OS)

Posted: Sat Apr 04, 2020 2:22 pm
by Andre
Thorsten1867 wrote:Update: Cursor keys
Thank you, Thorsten!

@mrv2k: your problems should also be gone with the latest update now :D

Re: [Module] TreeEx - Gadget (all OS)

Posted: Tue Apr 07, 2020 6:50 pm
by jackymb
Hi Thorsten,

Thank you very much for this module.

is it possible to add the edition of an item when the column is text? (by simple clik , double click or otherwise)