Jump to content

Problem with UniDBGrid's HeadTitle and vertical-align


zhyhero

Recommended Posts

I add an UniCombobox to UniDBgrid's HeadTitle area,

   self.UniDBGrid_Sample.JSInterface.JSCall('header.insert', [1, self.UniComboBox1.JSControl]);

P1.png.521aeb9c4161501ff4202fa74565ed6e.png

but height of headertitle area become more bigger,

so i reset the height of headertitle area to default,

   self.UniDBGrid_Sample.JSInterface.JSCall('header.setHeight', [HeaderHeight]);

P2.png.00b99a72a9d66300919a8141bc902ba2.png

now , the position of  titletext and unicombobox become strange, how to fix this?

source code 20230120_UniDBGrid_Combobox.zip

Link to comment
Share on other sites

Hello @zhyhero

Try also this approach:

procedure TMainForm.UniButton2Click(Sender: TObject);
begin
  JSInterface.JSCall('header.insert', [1, UniComboBox1.JSControl], UniDBGrid_Sample.JSControl);
  JSInterface.JSCall('setHeight', ['100%'], UniComboBox1.JSControl);
  JSInterface.JSCall('setStyle', [JSInterface.JSObject(['top', '-2px'])], UniComboBox1.JSControl);
end;

 

Link to comment
Share on other sites

  • 3 weeks later...
16 minutes ago, zhyhero said:

Temporary : 

procedure TUniFrame1.UniDBGrid1AfterLoad(Sender: TUniCustomDBGrid);
begin
     ....JSInterface.JSCall('setStyle', [JSInterface.JSObject(['top', '-2px'])], UniComboBox1.JSControl);
end;

I'm sorry, I forgot...

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