Jump to content

Why is TUniDateTimePicker rendering last on Unigui UniFieldSet?


pro_imaj

Recommended Posts

Hi,

Why does Unigui TUniDateTimePicker render last?

Why is the datetimepicker always at the bottom when I want to create objects in the commands below at runtime?

Why doesn't Unigui generate code by order? Why does the DatetimePicker always spawn at the bottom?

 

procedure TMainForm.UniButton2Click(Sender: TObject);
var
  i: Integer;
  aEdit: TUniEdit;
  aCombo: TUniComboBox;
  aCheckBox: TUniCheckBox;
  aDate: TUniDateTimePicker;
  aSpin: TUniSpinEdit;
begin

  aDate := TUniDateTimePicker.Create(self);
  aDate.Parent := UniFieldSet1;
  aDate.FieldLabel := 'DateTime' + i.ToString;

  aEdit := TUniEdit.Create(self);
  aEdit.Parent := UniFieldSet1;
  aEdit.FieldLabel := 'Edit' + i.ToString;

  aCombo := TUniComboBox.Create(self);
  aCombo.Parent := UniFieldSet1;
  aCombo.FieldLabel := 'Combo' + i.ToString;

  aCheckBox := TUniCheckBox.Create(self);
  aCheckBox.Parent := UniFieldSet1;
  aCheckBox.FieldLabel := 'CheckBox' + i.ToString;

  aSpin := TUniSpinEdit.Create(self);
  aSpin.Parent := UniFieldSet1;
  aSpin.FieldLabel := 'SpinEdit' + i.ToString;

end;

 

image.png.e8558c85ab05aab9d6373f66c2405dcc.png

Link to comment
Share on other sites

22 minutes ago, Sherzod said:

Hi,

Use CreateOrder property. 

The DateTimePicker, which I use as you wrote, produces the latest!

  aDate := TUniDateTimePicker.Create(self);
  aDate.Parent := UniFieldSet1;
  aDate.FieldLabel := 'DateTime' + i.ToString;
  aDate.CreateOrder := 0;


  aEdit := TUniEdit.Create(self);
  aEdit.Parent := UniFieldSet1;
  aEdit.FieldLabel := 'Edit' + i.ToString;
  aEdit.CreateOrder := 1;

image.png.27c779e2aeb92fb6be759973827dcca6.png

Link to comment
Share on other sites

  • pro_imaj changed the title to Why is TUniDateTimePicker rendering last on Unigui UniFieldSet?
10 hours ago, pro_imaj said:

There is no problem creating the runtime object on the form. But this problem occurs when creating UniFieldSet1 object, I think there is a bug here!

This should have been fixed.

Here are some related issues (and workarounds)

 

  • Like 1
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.

×
×
  • Create New...