We are using color to decide which company the user is in. On Form 330, we are givin the Shape-Control the background color = Blue, if the user are in a test company. How can I change this color from the Form_OnFormat ? I can change the color on the text in a TextBox (CurrForm.myText.UPDATEFORECOLOR(255)), but there isn’t any OnFormat for a Shape-Control…
Do it in the form OnOpen.
Hi! Create different shapes with different colors, e.g.: Shape1, Color blue, (Company A) Shape2, Color red, (Company B) … Now you could use the VISIBLE-Property in OnOenForm of Form 330 to set the Shapes! OnOpenForm (Form 330) CASE COMPANYNAME OF 'Company A': BEGIN CurrForm.Shape1.VISIBLE(TRUE); CurrForm.Shape2.VISIBLE(FALSE); END; 'Company B': BEGIN CurrForm.Shape1.VISIBLE(FALSE); CurrForm.Shape2.VISIBLE(TRUE); END; END;
Regards, Jörg
quote:
Originally posted by eromein
Do it in the form OnOpen.
I can’t find out how i can use UPDATEFORECOLOR for “Shape” object. Even in OnOpenForm trigger. Please, post any example! [?]
Hi! A “Shape” has definitley NO Property like UPDATEFORECOLOR, that’s why I suggest to do it with VISIBLE [;)] Regards, Jörg
quote:
Do it in the form OnOpen.
and by the way: UPDATEFORECOLOR works only in an OnFormat-Trigger, otherwise an ERROR occurs …