zhyhero Posted January 20, 2023 Share Posted January 20, 2023 I add an UniCombobox to UniDBgrid's HeadTitle area, self.UniDBGrid_Sample.JSInterface.JSCall('header.insert', [1, self.UniComboBox1.JSControl]); 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]); now , the position of titletext and unicombobox become strange, how to fix this? source code 20230120_UniDBGrid_Combobox.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 20, 2023 Share Posted January 20, 2023 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; Quote Link to comment Share on other sites More sharing options...
zhyhero Posted January 21, 2023 Author Share Posted January 21, 2023 Thank you. But still have problem when in a frame . source code : 20230121_UniDBGrid_Combobox_Frame.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 21, 2023 Share Posted January 21, 2023 I will try to check. Quote Link to comment Share on other sites More sharing options...
zhyhero Posted February 9, 2023 Author Share Posted February 9, 2023 Temporary : procedure TUniFrame1.UniDBGrid1AfterLoad(Sender: TUniCustomDBGrid); begin ....JSInterface.JSCall('setStyle', [JSInterface.JSObject(['top', '-2px'])], UniComboBox1.JSControl); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 9, 2023 Share Posted February 9, 2023 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.