increase padding of separator in toolbar
Hi there,
In my toolbar I made a button that is a separator by using the BTNS_SEP style. I'm using this button to break up two buttons. However, that amount of separation is not enough for my tastes. Is there a way to increase the padding around the separator so that it is larger/thicker? Thanks.
Re: increase padding of separator in toolbar
You have three options:
(1) Put two or more separators (which will probably look silly)
(2) Create another toolbar and position it so that it is "enough for your tastes", or
(3) Program a toolbar from scratch and make separators thicker.
Re: increase padding of separator in toolbar
The trick is:
Quote:
MSDN
TBBUTTON
If the button is a separator, that is, if fsStyle is set to BTNS_SEP, iBitmap determines the width of the separator, in pixels.
Example:
Code:
int nIndex = 2;
TBBUTTON tbb = {0};
tbb.fsStyle = BTNS_SEP; // or TBSTYLE_SEP;
tbb.iBitmap = 20; // The width of the separator, in pixels
::SendMessage(hWndToolbar, TB_INSERTBUTTON, (WPARAM)nIndex, (LPARAM)&tbb);
Re: increase padding of separator in toolbar
Hey, it's a good one, ovidiucucu. Is it actually documented?
Re: increase padding of separator in toolbar
Quote:
Originally Posted by
dc_2000
Hey, it's a good one, ovidiucucu. Is it actually documented?
Yes. In MSDN.
// Sorry, I added the quote later.
Re: increase padding of separator in toolbar
Quote:
Originally Posted by
ovidiucucu
The trick is:
Example:
Code:
int nIndex = 2;
TBBUTTON tbb = {0};
tbb.fsStyle = BTNS_SEP; // or TBSTYLE_SEP;
tbb.iBitmap = 20; // The width of the separator, in pixels
::SendMessage(hWndToolbar, TB_INSERTBUTTON, (WPARAM)nIndex, (LPARAM)&tbb);
It worked! Thanks!