News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to set gap between buttons in flat toolbar

Started by arafel, June 07, 2005, 07:41:55 PM

Previous topic - Next topic

arafel

I am trying to create a toolbar with gaps between some of the buttons. When using a standard toolbar style it's rather easy. Placing a separator between the buttons works fine. However when using TBSTYLE_FLAT the separator is displayed with a vertical line. I have tried setting TBSTATE_HIDDEN state for separator, but it completely removes it.

Is it possible to remove this annoying line from separator or is there any other way to make a variable width gap between buttons in a flat toolbar?

The only solution i came to for the moment is to use a number of disabled, imageless and textless buttons as separator.
But the problem is the 'separator' cannot be of variable size. It's width is always a multiple of buttons width. So it's impossible to move the button to correct place if the window is resized for example.


thanks

hutch--

arafel,

I think its a limitation in the toolbar control design. I looked for a way myself with my later text editor Topgun but even with the much later common controls, it is the only seperator that works with a FLAT toolbar style. Short of coding your own custom button which is not a bad approach, I doubt there is a way to do it without the line showing.

If you don't mind playing with up and down bitmaps, there is a bitmap button control in the masm32 library which may serve as a guideline for one you may want to write yourself.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

arafel

Thanks hutch. I will definitely check the bitmap button control example.

jojo

Another way might be to add spaces or CHR$(255) to your toolbar items.