CONTROLS
Get the name of a control
Try this...
CLEAR LOCAL
LOCAL FN GetBtnName$(btnID%)
DIM btnTitle$, btnH&
btnH& = BUTTON(btnID%)
LONG IF btnH&
CALL GETCTITLE(btnH&, btnTitle$)
END IF
END FN = btnTitle$
This taken from Frank Turovich's "Learning FutureBASIC II - The Toolbox".
The "contrlRect" field is neither a pointer to the title nor a handle to the title. Instead, it's a 255-byte field which actually _contains_ the title. given a handle b& to the button's control record, you can get the title as follows:
theString$ = b&..contrlTitle$
|