wxToolBar:: SetToolSeparation() doesn't work
wxToolBar:: SetToolSeparation() doesn't work
Hey guys, I'm working with wxWidgets 3.0.3 and wxSmith on Code::Blocks. I added a wxToolBar and a separator with wxSmith and tried to manually change the size of the separator since the Toolbar Editor provided by wxSmith couldn't define the size of it. However, wxToolBar:: SetToolSeparation() didn't work at all, and the separator was always the default size, which was 5 I believe. Anybody knows how to make it work?
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: wxToolBar:: SetToolSeparation() doesn't work
It has no effect here (in Windows 7 against wx 3.01) too. Despite the code below, the separation remains unchanged on screen.
So, maybe it's a limitation of the underlying native toolbar OR because it's not implemented in wxMSW.
Looking quickly at code, I see that there's only one implementation of wxToolBar::SetToolSeparation in "src/gtk1/toolbar.cpp" and in the base class (tbarbase.h|cpp), I just see it assigns the new passed value to m_toolSeparation... So the next step would be to check where this member variable is in-use for real; maybe during Realize().
--
EDIT: In my C::B's wxSmith (svn 10895, an old version), I can indicate the separation size (there's a field in the toolbar properties and it well writes down the SetToolSeparation() line in code for you.
Code: Select all
ToolBar1->SetToolSeparation(200);
Looking quickly at code, I see that there's only one implementation of wxToolBar::SetToolSeparation in "src/gtk1/toolbar.cpp" and in the base class (tbarbase.h|cpp), I just see it assigns the new passed value to m_toolSeparation... So the next step would be to check where this member variable is in-use for real; maybe during Realize().
--
EDIT: In my C::B's wxSmith (svn 10895, an old version), I can indicate the separation size (there's a field in the toolbar properties and it well writes down the SetToolSeparation() line in code for you.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: wxToolBar:: SetToolSeparation() doesn't work
I have tried it already, it's not working for me unfortunately
- eranon
- Can't get richer than this
- Posts: 867
- Joined: Sun May 13, 2012 11:42 pm
- Location: France
- Contact:
Re: wxToolBar:: SetToolSeparation() doesn't work
However, if it's important for you, you can always dig and see against native toolbar if there's a way or not... For Windows, you can play with TB_SETPADDING (see https://msdn.microsoft.com/en-us/librar ... s.85).aspx).
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]
Re: wxToolBar:: SetToolSeparation() doesn't work
Thank you very much for the help. I will start looking into the native toolbar documentation