wx.Notebook button alongside tabs

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

wx.Notebook button alongside tabs

John Lane
I'm using the notebook as the main interface for a small application and
I would like to add a discrete button at the right-hand end of the tab
bar off which I can hang a menu. Think the "hamburger" menu many
websites have these days.

I have a subclass of wx.Notebook where I would like to add this. I'm not
sure how to go about it so would appreciate any pointers or examples
that can set me off along the right path...

In case it make any difference, I'm targeting GTK, MSW and MacOS.

Thanks,
John

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wx.Notebook button alongside tabs

Vadim Zeitlin-4
On Mon, 15 May 2017 17:31:32 +0100 John Lane wrote:

JL> I'm using the notebook as the main interface for a small application and
JL> I would like to add a discrete button at the right-hand end of the tab
JL> bar off which I can hang a menu. Think the "hamburger" menu many
JL> websites have these days.
JL>
JL> I have a subclass of wx.Notebook where I would like to add this. I'm not
JL> sure how to go about it so would appreciate any pointers or examples
JL> that can set me off along the right path...

 The simplest would probably switch to using wxAuiNotebook which supports
this out of the box, see the (C++) aui sample. The native wxNotebook
control does not support this and there is no simple way to do it with it,
unfortunately.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wx.Notebook button alongside tabs

John Lane
On 15/05/17 17:43, Vadim Zeitlin wrote:

>
>  The simplest would probably switch to using wxAuiNotebook which supports
> this out of the box, see the (C++) aui sample.

Thank you, that was the pointer I needed. I very quickly changed my code
and now have wxAuiNotebook running. I am still trying to work out how to
add a button but I have seen the style "wx.aui.AUI_NB_CLOSE_BUTTON"
which adds a tab-close button exactly where I want my button.

I'm having difficulty locating the C++ sample that does this but still
looking...

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: wx.Notebook button alongside tabs

oneeyeman
Hi, John,

On Mon, May 15, 2017 at 2:35 PM, John Lane <[hidden email]> wrote:

> On 15/05/17 17:43, Vadim Zeitlin wrote:
>
>>
>>  The simplest would probably switch to using wxAuiNotebook which supports
>> this out of the box, see the (C++) aui sample.
>
> Thank you, that was the pointer I needed. I very quickly changed my code
> and now have wxAuiNotebook running. I am still trying to work out how to
> add a button but I have seen the style "wx.aui.AUI_NB_CLOSE_BUTTON"
> which adds a tab-close button exactly where I want my button.
>
> I'm having difficulty locating the C++ sample that does this but still
> looking...

It will be in the wxWidgets/samples/auidemo.cpp

Thank you.

>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to [hidden email]
> or visit http://groups.google.com/group/wx-users

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users