Button style, is it available in wxpython 4?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Button style, is it available in wxpython 4?

floatingshed

This is the save button used in LibreOffice. On the left is the normal state. On the right a pop-up menu appears when the down arrow is clicked. I assume that it is just one widget as mouse-over highlights both parts.
Much neater than having "Save" and "Save as" as separate buttons. I can't find this in any of the wxpython docs, anyone know anything about it? Thanks.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Button style, is it available in wxpython 4?

Andrea Gavana
On Sun, 26 Nov 2017 at 13.36, <[hidden email]> wrote:

This is the save button used in LibreOffice. On the left is the normal state. On the right a pop-up menu appears when the down arrow is clicked. I assume that it is just one widget as mouse-over highlights both parts.
Much neater than having "Save" and "Save as" as separate buttons. I can't find this in any of the wxpython docs, anyone know anything about it? Thanks.





Andrea.





--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Button style, is it available in wxpython 4?

floatingshed
In reply to this post by floatingshed
Very nice! Thanks Andrea, but I would not have the first clue how to use that in place of a standard wx.button :-(

On Sunday, November 26, 2017 at 12:36:43 PM UTC, [hidden email] wrote:

<a href="https://lh3.googleusercontent.com/-cABatwmHJHg/Whq0-VgoMhI/AAAAAAAACZ8/3n9y7TLe4ekqmtcnBOew-iUnk78Fn9JeQCLcBGAs/s1600/Image3.jpg" style="margin-left:1em;margin-right:1em" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-cABatwmHJHg/Whq0-VgoMhI/AAAAAAAACZ8/3n9y7TLe4ekqmtcnBOew-iUnk78Fn9JeQCLcBGAs/s1600/Image3.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-cABatwmHJHg/Whq0-VgoMhI/AAAAAAAACZ8/3n9y7TLe4ekqmtcnBOew-iUnk78Fn9JeQCLcBGAs/s1600/Image3.jpg&#39;;return true;">

This is the save button used in LibreOffice. On the left is the normal state. On the right a pop-up menu appears when the down arrow is clicked. I assume that it is just one widget as mouse-over highlights both parts.
Much neater than having "Save" and "Save as" as separate buttons. I can't find this in any of the wxpython docs, anyone know anything about it? Thanks.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Button style, is it available in wxpython 4?

Andrea Gavana

On Sun, 26 Nov 2017 at 15.23, <[hidden email]> wrote:
Very nice! Thanks Andrea, but I would not have the first clue how to use that in place of a standard wx.button :-(


AuiToolbar and RibbonBar are supposed to be used as “replacements” or “enhancements” of the standard wx.Toolbar. I doubt you can use any of those as a replacement for a single wx.Button. 

Your best bet is to take a look at how AuiToolbarButton is implemented and use that code to create your own, owner drawn button from scratch. wx.lib.buttons is going to be helpful too.

Andrea.




On Sunday, November 26, 2017 at 12:36:43 PM UTC, [hidden email] wrote:

This is the save button used in LibreOffice. On the left is the normal state. On the right a pop-up menu appears when the down arrow is clicked. I assume that it is just one widget as mouse-over highlights both parts.
Much neater than having "Save" and "Save as" as separate buttons. I can't find this in any of the wxpython docs, anyone know anything about it? Thanks.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Button style, is it available in wxpython 4?

Robin Dunn


On Sunday, November 26, 2017 at 6:29:23 AM UTC-8, Infinity77 wrote:

On Sun, 26 Nov 2017 at 15.23, <[hidden email]> wrote:
Very nice! Thanks Andrea, but I would not have the first clue how to use that in place of a standard wx.button :-(


AuiToolbar and RibbonBar are supposed to be used as “replacements” or “enhancements” of the standard wx.Toolbar. I doubt you can use any of those as a replacement for a single wx.Button. 

Your best bet is to take a look at how AuiToolbarButton is implemented and use that code to create your own, owner drawn button from scratch. wx.lib.buttons is going to be helpful too.




In addition, the native toolbar now also supports associating a dropdown menu with a toolbar button on MSW and GTK. I've not used it myself yet so I'm unsure what it looks like, but you can try it with 

    tbar.SetDropdownMenu(itemID, menu)


-- 
Robin Dunn
Software Craftsman
http://wxPython.org

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.