Welcome, David. Check out the PROPERTY and GETPROPERTY commands.
Place the rectangle on the form and assign a component ID to it. Assign
a component ID to the check box.
Create an On Click eep on the check box.
SET VAR vBox TEXT
GETPROPERTY cCheckBox TEXTVALUE 'vBox'
--Assuming you are using T/F for the box, this will give you a T or F in
the variable vBox
IF vBox = 'T' then
PROPERTY cRectangle COLOR 'Green'
ELSE
PROPERTY cRectangle COLOR 'Red'
ENDIF
RETURN
Now each time you click the box, the eep will set the color of the
rectangle to match the box. I suspect it is the On Click Eep that is
what you are missing in your thinking. It takes a while. There is an
awful lot of things to search out in R:Base - and I don't know half of
them.
Albert
David R Haslam wrote:
I want to create a form with a check box and a rectangle on it. I want
the rectangle to be one color if the check box is true, and switch to
a second color if the check box is false. It must change color
whenever the check box is clicked. Initially, for the testing, the
check box does not need to be linked to a field in a table. In Access
or VB it would take me less than a minute to do the whole thing. But,
I’ve been racking my brains because I don’t know the structures and
syntax in rBase yet.