A long time ago, I went through and figured this out.  Luckily, I
saved the results as a comment in my toolbar.pl file.  Here's what I
have:

# first row is the number of buttons in this toolbar
# each additional row corresponds to a button
# first number is the zero-based index of the appropriate picture from the 
bitmap object
# second number is the number that will be passed to the _Click event
# third number is the state of the button
#       -0 dark gray can't be clicked
#       -1 light gray & sunken  can't be clicked
#       -2 dark gray & sunken  can't be clicked
#       -3 light gray & sunken  can't be clicked
#       -4 normal
#       -5 light & sunken can be clicked
#       -6 normal & sunken if clicked becomes normal
#       -7 light & sunken can be clicked
# fourth number is the visibility
#       -even visible
#       -odd invisible
# fifth number is the zero-based index of the string that should accompany the 
button

That last comment refers to the $TB->AddString statements in the
file, in the order that they were declared.  I'm sure it must be
possible to disable toolbar buttins on the fly, but I don't know how
(perhaps sending a message, a la the RichEdit workarounds that we've
seen on this list).


On 16 May 2001, at 15:17, Peter Köller wrote:

> Hello,
>
> has anyone an idea of the parameters in the ToolBar::AddButtons
> method?
>
> The example toolbar.pl does the following:
>
> $TB->AddButtons(
>     3,
>     0, 1, 4, 0, 0,
>     1, 2, 4, 0, 1,
>     2, 3, 4, 0, 2,
> );
>
> What is the meaning of the parameters and is it possible to make
> toolbar items disabled? Can disabled toolbar items have another image?
> (I need something like the speedbars in Office Applications).
>


Reply via email to