Out-of-toolbar icons

Hey everyone. I have made a toolbar inside a panel, and added some tools via AddSimpleTool. However where the icons are, they appear to be 1 or 2 pixels down from where they should be. There is a tiny white line above the toolbar where they are (which stops where the icons stop), and if I move the mouse over them, it messes up the border.

The attached image shows in the top half how it looks on initializing (or after a repaint), and the bottom half is after I have hovered over the 2nd and 3rd icon, and my mouse is currently on the last one. Does anyone have any ideas? I am using wxPython 2.8.1.1 on Windows XP and Python 2.5.

I have also tried making the icons smaller, even 8x8, but it just centers the small icons inside the bigger, out-of-place button.

Thanks,
Mike

icons.PNG

HI Mike,

Hey everyone. I have made a toolbar inside a panel, and added some tools via AddSimpleTool. However where the icons are, they appear to be 1 or 2 pixels down from where they should be. There is a tiny white line above the toolbar where they are (which stops where the icons stop), and if I move the mouse over them, it messes up the border.

I have no idea why this happens, but a couple of questions:

1) Are you using a sizer to hold the toolbar (I suppose the answer is "Yes");
2) Does it make any difference if you call:

TheToolbar.SetBestFittingSize()
TheSizer.Layout()

Not necessarily in this order?

Andrea.

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

···

On 1/26/07, Rooney, Mike (ext. 324) <mxr@qvii.com> wrote:

Hi Mike,

1) Are you using a sizer to hold the toolbar (I suppose the answer is "Yes");
2) Does it make any difference if you call:

TheToolbar.SetBestFittingSize()
TheSizer.Layout()

Sorry, that should read:

TheToolbar.SetInitialSize()

SetBestFittingSize() is deprecated in 2.8.

Andrea.

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

Yes I am using a sizer and thanks for the suggestions but none of them worked. (At first I typed None with a capital N haha, too much Python!). I also tried toolbar.Layout() and toolbar.Fit().

However we have decided to remove this toolbar anyway so it isn't a big deal anymore.

On a side note, since Robin said the only problem with AuiTabArt was that a few public's were missing, maybe we get to play around with that soon.

···

-----Original Message-----
From: Andrea Gavana [mailto:andrea.gavana@gmail.com]
Sent: Friday, January 26, 2007 11:54 AM
To: wxPython-users@lists.wxwidgets.org
Subject: Re: [wxPython-users] Out-of-toolbar icons

Hi Mike,

1) Are you using a sizer to hold the toolbar (I suppose the answer is "Yes");
2) Does it make any difference if you call:

TheToolbar.SetBestFittingSize()
TheSizer.Layout()

Sorry, that should read:

TheToolbar.SetInitialSize()

SetBestFittingSize() is deprecated in 2.8.

Andrea.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org