Straub, Roger wrote:
>Hello,
>
>Can any one tell me what the options in "AddButtons" mean?
>
>$TB->AddButtons(
>    3,
>    0, 1, 4, 0, 0,
>    1, 2, 4, 0, 1,
>    2, 3, 4, 0, 2,
>);
>
>(from Aldo's sample toolbar.pl)

from docs/guifunc.txt:

LRESULT AddButtons(handle,number,(+5 parameters for each button))
    the 5 parameters for each button are:
        bitmap
        id
        state
        style
        string

a more human-readable explanation:

handle is $TB (the toolbar itself)

number is the number of buttons you want to add

bitmap is the zero-based index of an image from the associated ImageList

id     is the button identifier (a unique number associated with the button)

state  is the state (pressed, unpressed, enabled, disabled, etc.) as
follows:
     1 TBSTATE_CHECKED
     2 TBSTATE_PRESSED
     4 TBSTATE_ENABLED
     8 TBSTATE_HIDDEN
    16 TBSTATE_INDETERMINATE
    32 TBSTATE_WRAP
    64 TBSTATE_ELLIPSES

style  is the button style as follows:
     0 TBSTYLE_BUTTON
     1 TBSTYLE_SEP
     2 TBSTYLE_CHECK
     4 TBSTYLE_GROUP
     8 TBSTYLE_DROPDOWN
   256 TBSTYLE_TOOLTIPS
   512 TBSTYLE_WRAPABLE
  1024 TBSTYLE_ALTDRAG
  2048 TBSTYLE_FLAT
  4096 TBSTYLE_LIST
  8192 TBSTYLE_CUSTOMERASE

string is the zero-based index of a string defined with the AddString()
       function.

*NOTE* that the TBSTATE_ and TBSTYLE_ constants are not defined, they're
reported here only as an explanation. for a more clear explanation, please
consult the Microsoft documentation...


phew! I hope it's enough for now ;-)
BTW, the last (but not least) line of the TODO file says:

- write the documentation


bye,
Aldo Calpini
<[EMAIL PROTECTED]>

 LIBERA ME DOMINE DE MORTE AETERNA
 IN DIE ILLA TREMENDA
 QUANDO COELI MOVENDI SUNT
 ET TERRA





Reply via email to