... FOR cnt = 1 TO 9 cLbl = '.DeMenuBut'+ALLTRIM(STR(cnt)) IF PEMSTATUS(This, m.cLbl, 5) ... oLbl = GETPEM(This, m.cLbl) ... oLbl.ForeColor = ... oLbl.FontUnderLine = ... ...>I made a label class for menu options (you can make them so much more attractive that command buttons!), with the look I wanted. I then added how many I needed to the form (9 of them). The class name is 'DeMenuBut'. In the form designer, they are DeMenuBut1 thru 9. To change their appearance, signalling to the user which has been clicked, and which haven't, I run the code below, and it sets all the 'menu buttons' properties correctly.
>cnt=0 >FOR cnt = 1 TO 9 > ObjForecolor='.DeMenuBut'+ALLTRIM(STR(cnt))+'.ForeColor' > ObjFontUnderline='.DeMenuBut'+ALLTRIM(STR(cnt))+'.FontUnderline' > > ThisObj='DeMenuBut'+ALLTRIM(STR(cnt)) > IF ThisObj#MenButton > WITH this > &ObjForecolor=RGB(0,0,0) > &ObjFontUnderline=.f. > ENDWITH > ELSE > WITH this > &ObjForecolor=RGB(255,0,0) > &ObjFontUnderline=.t. > ENDWITH > ENDIF >NEXT >