Jump to content

problem to create a TuniImage in runtime


mayusod

Recommended Posts

I am trying to create a TuniImage at runtime, but I could not.

I've seen the demo "Dynamic" and I can create other components at runtime, but not a Tunimage

 

 

this is ok.

 with TUniEdit(InsertControl(TUniEdit.Create(Self))) do
  begin
    Left:=10;
    Top:=40;
    Text:='Text';
  end;

 

but this no
 with TuniImage(InsertControl(TuniImage.Create(Self))) do
  begin
    Left:=10;
    Top:=40;
    Picture.LoadFromFile('Hydrangeas.jpg');
  end;

(The picture is in the same directory).

 

 

Link to comment
Share on other sites

  • Administrators
 with TUniEdit(InsertControl(TUniEdit.Create(Self))) do
  begin
    Left:=10;
    Top:=40;
    Text:='Text';
  end;

 

but this no
 with TuniImage(InsertControl(TuniImage.Create(Self))) do
  begin
    Left:=10;
    Top:=40;
    Picture.LoadFromFile('Hydrangeas.jpg');
  end;

 

 

 

Width and Height are missing.

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...