I'd be very tempted to give your MyEditfield class a property called "targetOval as Oval". You would create the oval at design time, setting it to false (or clone it from a base oval, where you create one instance and set it's index to 0) Then assign that oval to the Editfield by doing MyEditfield.targetOval = Oval(n).

You could then simply add this line of code to your class, wherever you may change the isCompulsory flag


if TargetOval <> nil then TargetOval.visible = isCompulsory


Cheers,
Tom

On 27/12/2006, at 1:44 AM, Youri wrote:



Hi,


I'd like to be able to make an Oval control visible/invisible programatically.

For instance I loop throught all my controls (MyEditfields) and if one of them (let's say ef_Name) has its property "Compulsory" as boolean set to "True" but is empty, then I want to access the Oval ov_Name and set its property "Visible" to "true".


Something in the flavour of :

dim s as string

if ef_Name.iscompulsory = true and ef_Name.text = "" then

  s = "Name"

  dim a as New Oval
  a.name = s
  a.visible = true

end if
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to