Hi, all
Excuse me for asking such a foolish question.
What I want to do is this: When I enter a tool, the tool should change
its size bigger, and leave it, back to its original size.
I bind two events, toolbar.Bind(wx.EVT_TOOL_ENTER, ...) and
toolbar.Bind(wx.EVT_LEAVE_WINDOW). I can't find a way to change a single
tool's size. And the mothod SetToolBitmapSize changes all. Can anyone
give a suggestion?
And another question:
Does AddLabelTool not work with win2000 sp4? I try that, it only adds a
tool, the label doesn't appear.In wxWidgets, its seems doing the same thing.
Like the OSX dock? I would suggest not doing such things, because while
the interactivity seems to make sense, you end up having to do some ugly
tricks with adjacent tools in order to make it look pretty.
If you really wanted to emulate it, you could use wx.BitmapButtons on a
plain panel, perhaps using a wx.SashWindow or wx.SplitterWindow a
dynamic sash/split movement, arranged with a wx.BoxSizer(wx.HORIZONTAL).
You could resize the buttons by choosing a different bitmap for a button
and using panel.Layout(). Be careful though, if you resize on mouse
over, then you could get "jumpy" behavior, which would be worse than if
you just left the icons alone.
- Josiah
···
Lialie - KingMax <lialie@gmail.com> wrote:
What I want to do is this: When I enter a tool, the tool should change
its size bigger, and leave it, back to its original size.
I bind two events, toolbar.Bind(wx.EVT_TOOL_ENTER, ...) and
toolbar.Bind(wx.EVT_LEAVE_WINDOW). I can't find a way to change a single
tool's size. And the mothod SetToolBitmapSize changes all. Can anyone
give a suggestion?
Hi, all
Excuse me for asking such a foolish question.
What I want to do is this: When I enter a tool, the tool should change
its size bigger, and leave it, back to its original size.
I bind two events, toolbar.Bind(wx.EVT_TOOL_ENTER, ...) and
toolbar.Bind(wx.EVT_LEAVE_WINDOW). I can't find a way to change a single
tool's size. And the mothod SetToolBitmapSize changes all. Can anyone
give a suggestion?
As Josiah mentioned, the toolbar is probably not the right widget for
this. You'll need to create a custom control to do it.
And another question:
Does AddLabelTool not work with win2000 sp4? I try that, it only adds a
tool, the label doesn't appear.In wxWidgets, its seems doing the same thing.
Did you use the wx.TB_TEXT style when creating the toolbar?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Hi, all
Excuse me for asking such a foolish question.
What I want to do is this: When I enter a tool, the tool should change
its size bigger, and leave it, back to its original size.
I bind two events, toolbar.Bind(wx.EVT_TOOL_ENTER, ...) and
toolbar.Bind(wx.EVT_LEAVE_WINDOW). I can't find a way to change a single
tool's size. And the mothod SetToolBitmapSize changes all. Can anyone
give a suggestion?
As Josiah mentioned, the toolbar is probably not the right widget for
this. You'll need to create a custom control to do it.
I see. I think I have to give it up, and get another way to make my
tools more dynamic.
Maybe I should create a window with a panel and put buttons on.
Is it possible to change the font of a tool's help string?
And another question:
Does AddLabelTool not work with win2000 sp4? I try that, it only adds a
tool, the label doesn't appear.In wxWidgets, its seems doing the same thing.
Did you use the wx.TB_TEXT style when creating the toolbar?
Would it work to fake the effect by having two sets of tool
icons ? Both sets would have the same icon size, say, 20x20
pixel. One set would have a "transparent" edge region and
the icon proper would occupy, say, 16x16 pixels. The other
would have larger pics in the icon covering the entire 20x20
region. Now, in on_enter/on_leave you'd switch between the
two sets giving the *impression* the size of the icon
changes - although really just the picture part of the icon
is larger.
Karsten
···
On Wed, Jun 28, 2006 at 09:21:49AM +0800, Lialie - KingMax wrote:
>> What I want to do is this: When I enter a tool, the tool should change
>> its size bigger, and leave it, back to its original size.
>> I bind two events, toolbar.Bind(wx.EVT_TOOL_ENTER, ...) and
>> toolbar.Bind(wx.EVT_LEAVE_WINDOW). I can't find a way to change a single
>> tool's size. And the mothod SetToolBitmapSize changes all. Can anyone
>> give a suggestion?
>>
>
> As Josiah mentioned, the toolbar is probably not the right widget for
> this. You'll need to create a custom control to do it.
I see. I think I have to give it up, and get another way to make my
tools more dynamic.