Hello.

There is a question in Russian forum how to dynamically create a component
and his frame.

http://freepascal.ru/forum/viewtopic.php?f=11&t=43228

I did try to register but did not get the mail to activate it.

I think this is the answer: frame must be created before to use it with:
 dynedit.frame := tcaptionframe.create(iscrollframe(self));
 

So in the code in the forum should be (imho):
______________________

procedure tmainfo.mainformcreated(const sender: TObject);
begin
  dynedit := tedit.Create(self);
  dynedit.bounds_cx := 100;
  dynedit.bounds_cy := 21;

  { Если скопировать frame из созданного в IDE teditʼа, то всё работает,
    но хотелось бы понять, как его создавать без IDE. }
  // dynedit.frame := tedit1.frame; //Чем это заменить???
  
 dynedit.frame := tcaptionframe.create(iscrollframe(self));  // Add this
  dynedit.frame.caption := 'Hello';    // This to test
   
  insertwidget(dynedit, makepoint(300, 10));
  dynedit.show;
end;
________________

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to