Jump to content

Access the object in the frame of the other forms of application


izotope

Recommended Posts

Well and how can I access the object in the frame of the other forms of application?
Let's say I have a frame called frOneFrame (TfrOneFrame) unit in which it is located uOneFrame
 
Button1 object
 
I tried (frOneFrame as TfrOneFrame) .Button1.Enabled = true;
 
But I did not work  :(
 
Thanks!

 

Link to comment
Share on other sites

You can declare a form in public part, after that, get it from typecast:

(MyForm.frOneFrame as TfrOneFrame) .Button1.Enabled = true;

Little do not understand. That is, I need a form from which I need access to the frame, declare the same frame?
Such form is called MyForm
Which section do it and how? Thank U!
Link to comment
Share on other sites

You can declare a form in public part, after that, get it from typecast:

(MyForm.frOneFrame as TfrOneFrame) .Button1.Enabled = true;

  (MainForm.FCurrentFrame as TfrCompanyGoodsFrame).UniTimer.Enabled:=true;

 

Invalid Typecast :(

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...