toolbar & pull-down

is it possible add pull-down menu to toolbar?
I would show up a down arrow attached to toolbar's item. When you
click on toolbar's item it does something. Instead when you click on
down arrow it shows a list of data.

···

--
Fabio Spadaro
www.fabiospadaro.com

Hi,

2009/9/16 Fabio Spadaro:

is it possible add pull-down menu to toolbar?
I would show up a down arrow attached to toolbar's item. When you
click on toolbar's item it does something. Instead when you click on
down arrow it shows a list of data.

I don't think it's possible with the standard toolbar yet (but I
believe wx-devs have been working on adding this feature). In the
meanwhile you can always use wx.lib.agw.AuiToolbar to get a drop-down
menu. See the wxPython demo for an example.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

My version is 2.8.8.1(ansi) for python 2.5 but import wx.lib.agw make
import error !
Have I to upgrade wxpython?

···

2009/9/16 Andrea Gavana <andrea.gavana@gmail.com>:

Hi,

2009/9/16 Fabio Spadaro:

is it possible add pull-down menu to toolbar?
I would show up a down arrow attached to toolbar's item. When you
click on toolbar's item it does something. Instead when you click on
down arrow it shows a list of data.

I don't think it's possible with the standard toolbar yet (but I
believe wx-devs have been working on adding this feature). In the
meanwhile you can always use wx.lib.agw.AuiToolbar to get a drop-down
menu. See the wxPython demo for an example.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
http://thedoomedcity.blogspot.com/

>

--
Fabio Spadaro
www.fabiospadaro.com

2009/9/16 Fabio Spadaro:

My version is 2.8.8.1(ansi) for python 2.5 but import wx.lib.agw make
import error !
Have I to upgrade wxpython?

I strongly advise you to upgrade: 2.8.8.1 is more than a year old. If
you can't upgrade, you might try getting a copy of wx.lib.agw using
SVN.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

I use the auitoolbar for this feature in my app...
I'm not sure if you're talking about a button with the dropdown arror
or the chevron button at the end of the toolbar...

I don't believe the demo actually shows one on the button itself, but
it's pretty simple...

you just do the standard:

ddbutton = AddSimpleTool(wx.NewId(), "Label", someBitmap)

then all you have to do is use:

ddbtn.SetHasDropDown(True)

However, you will have to bind it to

self.yourAuiToolbar.Bind(aui.EVT_AUITOOLBAR_TOOL_DROPDOWN,
self.OnClickDDButton, id=ddbtn.GetId())

it's the same event fired for the main button or dropdown arrow, you
just have to check:

if event.IsDropDownClicked():

    wx.Menu() ...

else:

    the regular button was pressed.

As far as I can tell there's no easier way with the auitoolbar, though
I could be wrong as I have an affinity for finding the hardest way to
do things..

···

On Sep 16, 4:53 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

2009/9/16 Fabio Spadaro:

> My version is 2.8.8.1(ansi) for python 2.5 but import wx.lib.agw make
> import error !
> Have I to upgrade wxpython?

I strongly advise you to upgrade: 2.8.8.1 is more than a year old. If
you can't upgrade, you might try getting a copy of wx.lib.agw using
SVN.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

You could create a small image as an arrow, for example with
SetToolBitmapSize (wx.Size (32, 10)) and managed as a normal toolbar'
s item.
is it wrong?

···

2009/9/17 michael h <michaelkenth@gmail.com>:

I use the auitoolbar for this feature in my app...
I'm not sure if you're talking about a button with the dropdown arror
or the chevron button at the end of the toolbar...

I don't believe the demo actually shows one on the button itself, but
it's pretty simple...

you just do the standard:

ddbutton = AddSimpleTool(wx.NewId(), "Label", someBitmap)

then all you have to do is use:

ddbtn.SetHasDropDown(True)

However, you will have to bind it to

self.yourAuiToolbar.Bind(aui.EVT_AUITOOLBAR_TOOL_DROPDOWN,
self.OnClickDDButton, id=ddbtn.GetId())

it's the same event fired for the main button or dropdown arrow, you
just have to check:

if event.IsDropDownClicked():

wx.Menu() ...

else:

the regular button was pressed.

As far as I can tell there's no easier way with the auitoolbar, though
I could be wrong as I have an affinity for finding the hardest way to
do things..

On Sep 16, 4:53 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

2009/9/16 Fabio Spadaro:

> My version is 2.8.8.1(ansi) for python 2.5 but import wx.lib.agw make
> import error !
> Have I to upgrade wxpython?

I strongly advise you to upgrade: 2.8.8.1 is more than a year old. If
you can't upgrade, you might try getting a copy of wx.lib.agw using
SVN.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

>

--
Fabio Spadaro
www.fabiospadaro.com

Hi,

2009/9/17 michael h:

I use the auitoolbar for this feature in my app...
I'm not sure if you're talking about a button with the dropdown arror
or the chevron button at the end of the toolbar...

I don't believe the demo actually shows one on the button itself

It does, see attached image.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Whoops, right you are, sad thing is I missed it when I first put it in
my app, AND right before I posted that message I looked again and
missed it.

Oblivious...and spreading lies...sorry

-toothrot

···

On Sep 17, 3:54 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi,

2009/9/17 michael h:

> I use the auitoolbar for this feature in my app...
> I'm not sure if you're talking about a button with the dropdown arror
> or the chevron button at the end of the toolbar...

> I don't believe the demo actually shows one on the button itself

It does, see attached image.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

AUI_Demo.png
68KViewDownload

it's Ok but i want to disable the 'move toolbar action'.
solving the issue using some style AUI but which one? or wrong?

···

2009/9/18 michael h <michaelkenth@gmail.com>:

Whoops, right you are, sad thing is I missed it when I first put it in
my app, AND right before I posted that message I looked again and
missed it.

Oblivious...and spreading lies...sorry

-toothrot

On Sep 17, 3:54 am, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi,

2009/9/17 michael h:

> I use the auitoolbar for this feature in my app...
> I'm not sure if you're talking about a button with the dropdown arror
> or the chevron button at the end of the toolbar...

> I don't believe the demo actually shows one on the button itself

It does, see attached image.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

AUI_Demo.png
68KViewDownload

>

--
Fabio Spadaro
www.fabiospadaro.com

Hi,

2009/9/28 Fabio Spadaro:

it's Ok but i want to disable the 'move toolbar action'.
solving the issue using some style AUI but which one? or wrong?

Try with the Fixed() method of AUI panes.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/