Jump to content

how to create an object at run-time


Guest
 Share

Recommended Posts

Message from: "Farshad Mohajeri"

 

"Jaider"

> how to create an object at run-time ???

 

Next version 0.71.0 will include a Demo for this.

 

I can give you a brief example here:

 

// Please note that in uniGUI we use "This" instead of "Self".

with TUniEdit(InsertControl(TUniEdit.Create(This))) do

begin

Left:=10;

Top:=40;

Text:='Text';

end;

 

with TUniButton(InsertControl(TUniButton.Create(This))) do

begin

Left:=10;

Top:=65;

Caption:='Button';

end;

 

with TUniLabel(InsertControl(TUniLabel.Create(This))) do

begin

Left:=10;

Top:=90;

Caption:='Label';

end;

 

with TUniMemo(InsertControl(TUniMemo.Create(This))) do

begin

Left:=10;

Top:=105;

Height:=100;

Width:=150;

Text:='Memo Text';

end;

 

 

.

 

Link to comment
Share on other sites

Message from: "Jaider"

 

how to protect some areas of grid from being edited ???

 

 

 

...............

 

 

Farshad Mohajeri wrote:

 

>

> "Jaider"

> > how to create an object at run-time ???

>

> Next version 0.71.0 will include a Demo for this.

>

> I can give you a brief example here:

>

> // Please note that in uniGUI we use "This" instead of "Self".

> with TUniEdit(InsertControl(TUniEdit.Create(This))) do

> begin

> Left:=10;

> Top:=40;

> Text:='Text';

> end;

>

> with TUniButton(InsertControl(TUniButton.Create(This))) do

> begin

> Left:=10;

> Top:=65;

 

 

> Caption:='Button';

> end;

>

> with TUniLabel(InsertControl(TUniLabel.Create(This))) do

> begin

> Left:=10;

> Top:=90;

> Caption:='Label';

> end;

>

> with TUniMemo(InsertControl(TUniMemo.Create(This))) do

> begin

> Left:=10;

> Top:=105;

> Height:=100;

> Width:=150;

> Text:='Memo Text';

> end;

 

.

 

Link to comment
Share on other sites

Message from: "Farshad Mohajeri"

 

"Jaider" wrote in message

news:PdYo9bZOLHA.1608@anaxavps227.anaxa.local...

> how to protect some areas of grid from being edited ???

 

A DBGrid or a StringGrid you mean?

 

Currently not implemented in uniGUI.

 

I think Ext JS allows it to be implemented for individual Columns.

 

Added to ToDo list.

 

 

.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...