It is currently Sat Feb 29, 2020 7:35 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [Module] ToolBarExModule.pbi
PostPosted: Tue Nov 28, 2017 10:51 am 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 24, 2005 4:02 pm
Posts: 1127
Location: Germany
ToolBarEx

The module is based on IconBarGadged by "kenmo". (05/2016)

ToolBarEXModule.pbi


Code:
  ; ToolBar::AddItem()                   - Add a clickable ToolBarEx item
  ; ToolBar::AutoSize()
  ; ToolBar::Button()                    - A helper function to create a single-item ToolBarEx which acts like a button gadget
  ; ToolBar::ClearItems()                - Remove all items from an ToolBarEx
  ; ToolBar::CountItems()                - Returns the number of ToolBarEx items (or all positions, including dividers and spacers)
  ; ToolBar::Disable()                   - Disable an ToolBarEx (True, False, or #Toggle)
  ; ToolBar::DisableItem()               - Disable an individual ToolBarEx item (True, False, or #Toggle)
  ; ToolBar::Free()                      - Removes an ToolBarEx and releases all its memory
  ; ToolBar::Gadget()
  ; ToolBar::GetAttribute()              - Get an ToolBarEx attribute (including some read-only attributes)
  ; ToolBar::GetColor()                  - Get an ToolBarEx color
  ; ToolBar::GetDisplayMode()
  ; ToolBar::GetFitHeight()
  ; ToolBar::GetFitWidth()
  ; ToolBar::GetFontID()
  ; ToolBar::GetItemText()               - Get an ToolBarEx item's text (specified by item number, clickable items only)
  ; ToolBar::GetLatchItem() 
  ; ToolBar::GetMargin()
  ; ToolBar::GetPadding()
  ; ToolBar::GetPopupMenu() 
  ; ToolBar::GetRadius() 
  ; ToolBar::GetReturnValue() 
  ; ToolBar::GetSpacing()
  ; ToolBar::GetViewHeight()
  ; ToolBar::GetViewWidth()
  ; ToolBar::Hide()                      - Hide an ToolBarEx (True, False, or #Toggle)
  ; ToolBar::Divider()                   - Add an ToolBarEx divider (vertical line between items)
  ; ToolBar::ItemNumberFromPosition()    - Convert an ToolBarEx position index (zero-based - includes dividers and spacers)
  ; ToolBar::LockRedraw()                - Lock ToolBarEx redraw (True, False, or #Toggle)
  ; ToolBar::LockSizes()                 - Lock ToolBarEx item sizes (True, False, or #Toggle)
  ; ToolBar::PositionFromItemNumber()    - Convert an ToolBarEx Item Number (zero-based - only includes clickable items)
  ; ToolBar::RemoveItem()
  ; ToolBar::Resize()                    - Remove an ToolBarEx item (icon, divider, or spacer) by position
  ; ToolBar::SetColor()                  - Set an ToolBarEx color or reset to default
  ; ToolBar::SetDisplayMode()            - Set the Display Mode (#ImageOnly, #ImageAndText, #TextOnly)
  ; ToolBar::SetFont()                   - Specify a custom font by its FontID (not its PB font number
  ; ToolBar::SetItemText()               - Set an ToolBarEx item's text (specified by item number, clickable items only)
  ; ToolBar::SetLatchItem()              - Specify a latched item by its item number (not its position number)
  ; ToolBar::SetMargin()                 - Set the margin (empty pixels between buttons and gadget border)
  ; ToolBar::SetMouseOverEvents()
  ; ToolBar::SetPadding()                - Set the button padding (pixels between buttons and dividers)
  ; ToolBar::SetPopupMenu()              - Specify a PB popup menu to automatically appear on right-clicks
  ; ToolBar::SetRadius()                 - Set the highlight corner radius (0 = no rounded corners)
  ; ToolBar::SetReturnValue()            - Set the Return Value mode (#ItemNumber, #Position, #UserData)
  ; ToolBar::SetSpacing()                - Set the button spacing (empty pixels between buttons and dividers)
  ; ToolBar::Spacer()                    - Add an ToolBarEx spacer (empty section which automatically fills any extra horizontal space)

_________________
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] ToolBarExModule.pbi
PostPosted: Tue Nov 28, 2017 12:11 pm 
Offline
Addict
Addict
User avatar

Joined: Sun Nov 05, 2006 11:42 pm
Posts: 4632
Location: Lyon - France
Works nice and looks professional on W10 X64 :shock:
Thanks for sharing 8)

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


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ToolBarExModule.pbi
PostPosted: Wed Dec 20, 2017 8:27 pm 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2242
Location: Germany
Very Cool... Thanks

small bug for mac with fontID

correct...
Code:
Procedure GadgetDefaults()
    Define.i TempGadget
   
    CompilerIf #PB_Compiler_OS = #PB_OS_MacOS    ; Default font
      If GadgetDefault\FontID = #Null
        TempGadget = TextGadget(#PB_Any, 0, 0, 0, 0, "")
        If TempGadget
          GadgetDefault\FontID = GetGadgetFont(TempGadget)
          FreeGadget(TempGadget)
        EndIf
      EndIf
    CompilerElse
      GadgetDefault\FontID = GetGadgetFont(#PB_Default)
    CompilerEndIf

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ToolBarExModule.pbi
PostPosted: Wed Dec 20, 2017 9:14 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 541
Very nice!
I like this: download, run, works!

Thanks a lot for sharing!


Top
 Profile  
Reply with quote  
 Post subject: Re: [Module] ToolBarExModule.pbi
PostPosted: Mon Nov 25, 2019 1:17 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 169
If I have no Items,

My app runs extreme slow and dies on line 526


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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