views:

36

answers:

1

Hello.

I need your help. I have a toolbar, which is next to a slider (screenshot: http://i54.tinypic.com/w2n6ag.jpg) and wxPython automatically puts a tiny 1px border under the [Play/Pause/Stop | Previous/Next] buttons.

This does not look nice at all so is it possible to remove it/set it to 0px? Thank you very much.

Here is part of the my code

    toolbar = wx.ToolBar(self, wx.ID_ANY, style=wx.TB_HORIZONTAL | wx.NO_BORDER | wx.TB_FLAT)
    toolbar.SetToolBitmapSize((24, 24))

    toolbar.AddRadioLabelTool(wx.ID_ANY, '', wx.Bitmap('icons/buttons/control_play.png'), shortHelp='Play', longHelp='')
    toolbar.AddRadioLabelTool(wx.ID_ANY, '', wx.Bitmap('icons/buttons/control_pause.png'), shortHelp='Pause', longHelp='')
    toolbar.AddRadioLabelTool(wx.ID_ANY, '', wx.Bitmap('icons/buttons/control_stop.png'), shortHelp='Stop', longHelp='')
    toolbar.AddSeparator()
    toolbar.AddLabelTool(wx.ID_ANY, '', wx.Bitmap('icons/buttons/frame_previous.png'), shortHelp='Previous', longHelp='')
    toolbar.AddLabelTool(wx.ID_ANY, '', wx.Bitmap('icons/buttons/frame_next.png'), shortHelp='Next', longHelp='')


    toolbar.Realize()

p/s: vertical toolbar (i.e. wx.TB_VERTICAL) does not have this bottom border so a temporary solution is to have 5 vertical toolbars next to each other (each has one button), but I guess there maybe another solution for this!?

A: 

I didn't know toolbars added lines. It must be platform specific and if so, then that's normal. The easiest way I can think of to workaround this is to just us a horizontal BoxSizer and put all your widgets in that instead.

Mike Driscoll