It is currently Thu Oct 01, 2020 3:21 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: [Module] TreeEx - Gadget (all OS)
PostPosted: Fri Dec 20, 2019 2:42 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
TreeEx Gadget - Module (all OS / DPI / 64Bit)

Tree Gadget with additional columns

Image

Code:
; 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

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Last edited by Thorsten1867 on Fri Dec 20, 2019 2:54 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Mon Dec 23, 2019 10:23 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1853
Location: Germany (Saxony, Deutscheinsiedel)
Looks and works very nice, thank you for sharing! :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Fri Feb 21, 2020 9:25 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 44
Location: SE England
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Sat Feb 22, 2020 5:44 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Code:
TreeEx::GetItemAttribute(#Tree, 1, TreeEx::#SubLevel) ; returns level of the item
TreeEx::GetItemState(#Tree, 1)                        ; returns state of the item (TreeEx::#Selected | TreeEx::#Checked)

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Sat Feb 22, 2020 7:00 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 44
Location: SE England
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Mon Mar 09, 2020 3:30 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
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]

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Fri Mar 13, 2020 6:22 pm 
Offline
User
User
User avatar

Joined: Fri Jan 20, 2012 3:40 pm
Posts: 44
Location: SE England
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Sat Apr 04, 2020 2:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1265
Location: Germany
Update: Cursor keys

_________________
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 10 x64] [PB V5.7x]


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Sat Apr 04, 2020 2:22 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1853
Location: Germany (Saxony, Deutscheinsiedel)
Thorsten1867 wrote:
Update: Cursor keys

Thank you, Thorsten!

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

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] TreeEx - Gadget (all OS)
PostPosted: Tue Apr 07, 2020 6:50 pm 
Offline
User
User

Joined: Wed Aug 11, 2004 7:37 pm
Posts: 16
Location: AIX en PROVENCE (France)
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)

_________________
Windows 10 x64/86 - PB 5.72LTS (x86 & x64)
_______________________________
~English is not my native language I'm using a translator~


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye