Might just be one of the things legends are made of
IconBarGadget - custom graphical toolbars
Re: IconBarGadget - custom graphical toolbars
Nice.
Might just be one of the things legends are made of
Might just be one of the things legends are made of
- Fangbeast
- PureBasic Protozoa

- Posts: 4795
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: IconBarGadget - custom graphical toolbars
D'oh!! I am so dumb that I never thought of that!! Remind me to soundly bash myself around the head with a rubber chicken!In your case, if you really wanted to, you could put [ IconBarGadget | Strings and Combos | Another IconBarGadget ], in fact there is already a helper procedure which creates a one-button IconBarGadget.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
- Fangbeast
- PureBasic Protozoa

- Posts: 4795
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: IconBarGadget - custom graphical toolbars
Strange one. I made an extra 'exit' button with the helper "IconBarGadgetButton" so that I could have other gadgets in between but the highlight over the button is a good 2-3mm shorter in height than the full bar as I hover over it?
If I hover over the "Add" button, the highlight box is nearly the height of the bar. If I hover over the "Exit" button, the highlight box comes up right underneath the last pixel of the word "exit".
Can't see anything obvious.
If I hover over the "Add" button, the highlight box is nearly the height of the bar. If I hover over the "Exit" button, the highlight box comes up right underneath the last pixel of the word "exit".
Can't see anything obvious.
Code: Select all
IBG(0) = IconBarGadget(0, 490, 790, 78, #IconBarDisplay_ImageAndText)
AddIconBarGadgetItem(IBG(0), "Add", #butAdd)
AddIconBarGadgetItem(IBG(0), "Copy", #butCopy)
AddIconBarGadgetItem(IBG(0), "Delete", #butDelete)
AddIconBarGadgetItem(IBG(0), "Edit", #butEdit)
AddIconBarGadgetItem(IBG(0), "Undelete", #butUndelete)
AddIconBarGadgetItem(IBG(0), "Export", #butExport)
AddIconBarGadgetItem(IBG(0), "Import", #butImport)
AddIconBarGadgetItem(IBG(0), "Find", #butFind)
AddIconBarGadgetItem(IBG(0), "Help", #butHelp)
AddIconBarGadgetItem(IBG(0), "Print", #butPrint)
AddIconBarGadgetItem(IBG(0), "Sticky", #butStickywindow)
AddIconBarGadgetItem(IBG(0), "ToolTips", #butTooltips)
AddIconBarGadgetItem(IBG(0), "TitleClock", #butClock)
AddIconBarGadgetItem(IBG(0), "Setup", #butSetup)
SetIconBarGadgetFontID(IBG(0), LoadFont(0, "Comic Sans MS", 10))
SetIconBarGadgetColor(IBG(0), #IconBar_BackgroundColor, $BFBFBF)
SetIconBarGadgetColor(IBG(0), #IconBar_HighlightColor, $400040)
SetIconBarGadgetColor(IBG(0), #IconBar_TextColor, $701919)
SetIconBarGadgetRadius(IBG(0), 7)
SetIconBarGadgetAttribute(IBG(0), #IconBar_MouseOverEvents, #True)
IBG(1) = IconBarGadgetButton(800, 490, 54, 78, #butExit, "Exit", #IconBarDisplay_ImageAndText)
SetIconBarGadgetFontID(IBG(1), LoadFont(1, "Comic Sans MS", 10))
SetIconBarGadgetColor(IBG(1), #IconBar_BackgroundColor, $BFBFBF)
SetIconBarGadgetColor(IBG(1), #IconBar_HighlightColor, $400040)
SetIconBarGadgetColor(IBG(1), #IconBar_TextColor, $701919)
SetIconBarGadgetRadius(IBG(1), 7)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: IconBarGadget - custom graphical toolbars
I think I know why... The "Button" procedure changes the default margin around the highlight to 0.
I assumed if someone was using a standalone button and gave coordinates, then they want the highlight at those exact coordinates with no margin. Didn't really think too much about this small change.
But if you want the "button" version to look exactly like the "normal" version, maybe try:
or just use another "normal" IconBar? (I can't test right now.)
I assumed if someone was using a standalone button and gave coordinates, then they want the highlight at those exact coordinates with no margin. Didn't really think too much about this small change.
But if you want the "button" version to look exactly like the "normal" version, maybe try:
Code: Select all
SetIconBarGadgetMargin(IBG(1), #IconBar_Default)Re: IconBarGadget - custom graphical toolbars
@kenmo,
The Ribbon is great addition. Thank you very much.
I wonder; is it possible to add or delete icons dynamically?
I tried this but they were always added on the last tab. Couldn't delete any, though.
This is not a request for you to add this feature, unless of course you wish to: it would be nice if it could be done as is.
The Ribbon is great addition. Thank you very much.
I wonder; is it possible to add or delete icons dynamically?
I tried this but they were always added on the last tab. Couldn't delete any, though.
This is not a request for you to add this feature, unless of course you wish to: it would be nice if it could be done as is.
DE AA EB
- Fangbeast
- PureBasic Protozoa

- Posts: 4795
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: IconBarGadget - custom graphical toolbars
Didn't change it. I'll try a normal iconbar when I get back from the shopping and junk food expeditionkenmo wrote:I think I know why... The "Button" procedure changes the default margin around the highlight to 0.
I assumed if someone was using a standalone button and gave coordinates, then they want the highlight at those exact coordinates with no margin. Didn't really think too much about this small change.
But if you want the "button" version to look exactly like the "normal" version, maybe try:
or just use another "normal" IconBar? (I can't test right now.)Code: Select all
SetIconBarGadgetMargin(IBG(1), #IconBar_Default)
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet
Re: IconBarGadget - custom graphical toolbars
Thanks davido.davido wrote:The Ribbon is great addition. Thank you very much.![]()
I wonder; is it possible to add or delete icons dynamically?
I tried this but they were always added on the last tab. Couldn't delete any, though.
There are no functions for dynamic RibbonBars written yet. But you can use a function like this to get an individual IconBarGadget from a Ribbon tab, and then use dynamic IconBarGadget functions on it!
Code: Select all
Procedure.i GetIconBarFromRibbonBar(*RB.RB_RIBBONBAR, Tab.i)
If (*RB And (Tab >= 0) And (Tab < ListSize(*RB\IconBar())))
SelectElement(*RB\IconBar(), Tab)
ProcedureReturn (*RB\IconBar())
EndIf
EndProcedureRe: IconBarGadget - custom graphical toolbars
@kenmo,
An unexpected bonus!
Thank you very much.
An unexpected bonus!
Thank you very much.
DE AA EB
Re: IconBarGadget - custom graphical toolbars
@kenmo, nice and very usefull stuff.
Thanks.
Thanks.
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
- doctorized
- Addict

- Posts: 882
- Joined: Fri Mar 27, 2009 9:41 am
- Location: Athens, Greece
Re: IconBarGadget - custom graphical toolbars
Nice work but no dpi awareness included.
Re: IconBarGadget - custom graphical toolbars
I would like to experiment with this code, but the link to the ZIP file containing the images is broken.
Does anyone have the file "iconbargadget_1.2.zip"?
If not, I guess I'll just find/create some suitable images. Thanks!
Does anyone have the file "iconbargadget_1.2.zip"?
If not, I guess I'll just find/create some suitable images. Thanks!
Re: IconBarGadget - custom graphical toolbars
I have version 1.12 of Kenmo's IconBarGadget.pbi and included images.
PM me and I'll zip it up for you
PM me and I'll zip it up for you
- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: IconBarGadget - custom graphical toolbars
Can you please put the zip file online somewhere? Like https://filebin.net or something? I don't do PMs anymore.
Re: IconBarGadget - custom graphical toolbars
PM sent - thank you very much!PM me and I'll zip it up for you
Re: IconBarGadget - custom graphical toolbars
Hi Barry,
Here's my Dropbox link: https://www.dropbox.com/scl/fi/jenqi1ym ... dyycm&dl=0
I'll make it available for a month or so. (I hate cluttering my Dropbox account with files that are there 'forever')
Here's my Dropbox link: https://www.dropbox.com/scl/fi/jenqi1ym ... dyycm&dl=0
I'll make it available for a month or so. (I hate cluttering my Dropbox account with files that are there 'forever')
- It was too lonely at the top.
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.21(x64) and Win 11 Pro (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
