|
-
August 22nd, 2009, 05:13 PM
#1
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.
-
August 23rd, 2009, 03:15 AM
#2
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.
-
August 23rd, 2009, 03:25 AM
#3
Re: increase padding of separator in toolbar
The trick is:
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);
Last edited by ovidiucucu; August 23rd, 2009 at 03:32 AM.
-
August 23rd, 2009, 03:34 AM
#4
Re: increase padding of separator in toolbar
Hey, it's a good one, ovidiucucu. Is it actually documented?
-
August 23rd, 2009, 03:45 AM
#5
Re: increase padding of separator in toolbar
 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.
-
August 23rd, 2009, 05:41 PM
#6
Re: increase padding of separator in toolbar
 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!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|