It is currently Wed Jan 22, 2020 8:28 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Mar 10, 2019 2:51 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
ToolBarGadget - Module (All OS / DPI)

  • Image sizes: 16x16 / 24x24 / 32x32
  • Sends either gadget or menu events (#PB_Event_Gadget / #PB_Event_Menu)
  • Separator and spacer elements available
  • Buttons can alternatively be assigned to pop-up menus.
  • Tooltips for individual buttons
  • automatic adjustment of buttons to maximum text width possible
  • automatic adjustment of gadget height possible when using text
  • automatic size adjustment of gadget to window size possible (#MoveX|#MoveY|#ResizeWidth|#ResizeHeight)
  • ComoBox / SpinGadget / ButtonGadget can be added additionally
  • DPI compatible

Image

Code:
; ToolBar::AddItem()              - similar to 'AddGadgetItem()'
; ToolBar::AttachPopupMenu()      - attachs a popup menu to the button
; ToolBar::ButtonText()           - similar to 'ToolBarButtonText()'
; ToolBar::ComboBox()             - adds a ComboBox to the toolbar
; ToolBar::DisableButton()        - similar to 'DisableToolBarButton()'
; ToolBar::DisableReDraw()        - disable/enable redrawing
; ToolBar::Separator()            - similar to 'ToolBarSeparator()'
; ToolBar::EventNumber()          - returns the event number (integer) of the toolbar button
; ToolBar::EventID()              - returns the event ID (string) of the toolbar button
; ToolBar::EventState()           - returns the state of a toolbar gadget (e.g. ComboBox)
; ToolBar::Free()                 - similar to 'FreeToolBar()'
; ToolBar::Gadget()               - similar to 'CreateToolBar()'
; ToolBar::GetAttribute()         - similar to 'GetGadgetAttribute()'
; ToolBar::GetIndex()             - returns item index of the corresponding event number
; ToolBar::GetIndexFromID()       - returns item index of the corresponding event ID
; ToolBar::GetGadgetNumber()      - returns the gadget number of the gadget at index position
; ToolBar::GetState()             - similar to 'GetGadgetState()'
; ToolBar::GetText()              - similar to 'GetGadgetText()'
; ToolBar::ImageButton()          - similar to 'ToolBarImageButton()'
; ToolBar::HideButton()           - hide button
; ToolBar::Height()               - similar to 'ToolBarHeight()'
; ToolBar::SetAutoResizeFlags()   - [#MoveX|#MoveY|#ResizeWidth|#ResizeHeight]
; ToolBar::SetAttribute()         - similar to 'SetGadgetColor()'
; ToolBar::SetColor()             - similar to 'SetGadgetAttribute()'
; ToolBar::SetFont()              - similar to 'SetGadgetFont()'
; ToolBar::SetGadgetFlags()       - [#Top/#Bottom]
; ToolBar::SetPostEvent()         - changes PostEvent [#PB_Event_Gadget/#PB_Event_Menu]
; ToolBar::SetSpinAttribute()     - similar to 'SetGadgetAttribute()' for the SpinGadget [#PB_Spin_Minimum/#PB_Spin_Maximum]
; ToolBar::SetState()             - similar to 'SetGadgetState()'
; ToolBar::SetText()              - similar to 'SetGadgetText()'
; ToolBar::Spacer()               - inserts available space between buttons
; ToolBar::SpinBox()              - adds a SpinGadget to the toolbar
; ToolBar::ToolTip()              - similar to 'ToolBarToolTip()'
; ToolBar::TextButton()           - similar to 'ButtonGadget()'


Download: ToolBarExModule.pbi

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Last edited by Thorsten1867 on Fri Dec 20, 2019 3:42 pm, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Mar 10, 2019 7:12 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4600
Location: Lyon - France
Really nice :D
Thanks for sharing 8)

_________________
ImageThe happiness is a road...
Not a destination


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Mar 10, 2019 8:08 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Jul 07, 2013 11:35 am
Posts: 450
Location: Canada
Super nice.

Best regards
StarBootics

_________________
The Stone Age did not end due to a shortage of stones !


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Mar 10, 2019 9:19 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
Added:

  • adjust individual buttons to the respective text width (#AdjustButtons)
  • adjust all buttons to the maximum text width (#AdjustAllButtons)
  • Focus with rounded corners (#RoundFocus)

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Mar 10, 2019 10:00 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1706
Location: Germany (Saxony, Deutscheinsiedel)
Nice and useful, thanks for sharing! :D

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Tue Mar 12, 2019 10:41 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
Added: ComboBox / SpinGadget / ButtonGadget

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sat Mar 30, 2019 9:22 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
Update:
  • Bugfixes: Tooltips
  • Added: Tooltips for ComboBox & SpinGadget & TextButton

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sat Jun 29, 2019 6:44 pm 
Offline
User
User

Joined: Mon Dec 12, 2016 1:37 pm
Posts: 86
Thorsten1867
Many thanks for sharing. I'am very sorry, but I have small note: if you click on the names of the buttons in a row, all these buttons will be highlighted. Would be great if it fixed.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Jun 30, 2019 10:30 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
ZX80 wrote:
Thorsten1867
Many thanks for sharing. I'am very sorry, but I have small note: if you click on the names of the buttons in a row, all these buttons will be highlighted. Would be great if it fixed.


Bug fixed

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Jun 30, 2019 2:02 pm 
Offline
User
User

Joined: Mon Dec 12, 2016 1:37 pm
Posts: 86
Thorsten1867
1st. Thank you.
2nd. Good, but not enough. Sorry, but now I am not receiving messages in the debugger window when I click on the button. No events.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Jun 30, 2019 9:07 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
ZX80 wrote:
Thorsten1867Sorry, but now I am not receiving messages in the debugger window when I click on the button. No events.

Bug fixed

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Mon Jul 01, 2019 2:41 pm 
Offline
User
User

Joined: Mon Dec 12, 2016 1:37 pm
Posts: 86
Thorsten1867, thank you very much. Now everything is fine.
You are just a klondike with gold codes/modules. I also watch news in the topic: "Chart - Gadget". It's very interesting for me.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Sep 01, 2019 12:26 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Mar 27, 2009 9:41 am
Posts: 746
Location: Athens, Greece
Nice code, thanks for sharing! Is there a way to add the text inside the button too? (both image and "new","save", etc inside the button.)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Sun Sep 01, 2019 3:21 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
Update: Flag '#TextInside' hinzugefügt.

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] Extended ToolBar-Gadget (all OS / DPI)
PostPosted: Thu Sep 05, 2019 11:14 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1077
Location: Germany
Update: Added support for TrackBar gadget

_________________
Sorry for my English. My language is German.
(Translated with http://www.DeepL.com/Translator)

Download of PureBasic - Modules

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 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