>George,
> As you gave the sample add button code to John, can i ask you some quetions?
>>WITH This.FormTools.Buttons
>>DIMENSION a_buttons[6]
>>a_buttons[1] = 'Open'
>>a_buttons[2] = 'Close'
>>a_buttons[3] = 'Top'
>>a_buttons[4] = 'Previous'
>>a_buttons[5] = 'Next'
>>a_buttons[6] = 'Bottom'
>>lnlast = ALEN(a_buttons, 1)
>>FOR lni = 1 TO lnlast
>>.Add(, a_buttons[lni], a_buttons[lni], 0, lni)
>>NEXT
>>ENDWITH
>
>Is it there have 5 parameters pass into the this.formtool.button.add()
>what are there represent for ?
>
>regard,
Hi chang,
There are five parameters, but each is actually optional. In the snippet above, the index (first parameter) is omitted. The index specifies the position or order on the toolbar. The second parameter is the key. This must be unique and should be passed (but is optional). The parameter can be used in the ButtonClick event to determine which button was clicked. The third parameter is the text that'll appear on the button. Again, this is optional. The fourth parameter is the style. The style can be one of the following (taken from the MSDN library)
"tbrDefault 0 The button is a regular push button.
tbrCheck 1 The button is a check button.
tbrButtonGroup 2 The button remains pressed until another button in the
group is pressed. Exactly one button in the group is pressed
at any time.
tbrSeparator 3 The button functions as a separator with a fixed width of 8
pixels.
tbrPlaceholder 4 The button is like a separator in appearance and functionality
but has a settable width."
The last parameter is the image number. This value corresponds to the image number in the image list.
hth,
George
Ubi caritas et amor, deus ibi est