FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

CONTROLS

Know the status of a control


You have 2 options.

If the button is in an active window the easy way works:

status = BUTTON (ID) 'status = _grayBtn if gray.

If you want to know about a PG object before the window is drawn (to set up options etc.) use FN pGgetRef to fill the object record.

gObjCtrlVal = status 'as above

I do the latter to change default options given certain situations.
For example, I use a related procedure to make an AROW object sensitive to the state of an edit field. If the field to the left of the AROW object is gray, the AROW object is also made grey and deactivated. If the option settings change so that the field becomes active & editable, the AROW is made black and is activated. This is a very handy modification to the AROW.FLTR

David