Using stock bitmap/id in the toolbar

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Using stock bitmap/id in the toolbar

Post by ONEEYEMAN »

Hi, ALL,
The page at here says that it is possible to use stock items with wxButton and wxMenuItem.
And I can also use it with the wxArtProvider.

I need to use them with the wxToolbar items.
I can't use wxArtProvider, because not all of those are defined there.
And it seems neither wxBitmap nor wxMenuItem can be used.

Specifically, I need to use justification icons and font charasteristics icons alone with their respectful ids.

So how can I do that? Could someone please give me a hint?
Should I derive a new art provider and have those icons available.

It would be nice if the default art provider have the icons for {all} those ids, so that it could be used everywhere...

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Using stock bitmap/id in the toolbar

Post by doublemax »

TBH, i would just use non-standard IDs and use my own bitmaps. Everything else seems like too much hazzle.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Using stock bitmap/id in the toolbar

Post by ONEEYEMAN »

doublemax,
I'd love to.
Except nanoSVG doesn't render text, which means the button for "Bold", "Italic", "Underline" and "Strikethrough" are out.

And I want to have everything in SVG which is easier to manage...

Thank you.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Using stock bitmap/id in the toolbar

Post by DavidHart »

I don't understand enough of the situation to be sure it's relevant, but have you thought of using the XRCCTRL macro?
See the XRC and IDs section of https://docs.wxwidgets.org/stable/overview_xrc.html. It's not restricted to XRC, though; it's useful elsewhere too.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Using stock bitmap/id in the toolbar

Post by doublemax »

ONEEYEMAN wrote: Sun Mar 26, 2023 5:25 pm Except nanoSVG doesn't render text, which means the button for "Bold", "Italic", "Underline" and "Strikethrough" are ou
I'm pretty sure there are SVGs for these functions that do not use text functions to render the icon.
Use the source, Luke!
Post Reply