newsanti Posted January 9, 2023 Share Posted January 9, 2023 1.Create CSS at Run-Time ------------------ oList:= TStringList.Create; oList.Add('.customGrid .x-grid-td {'); oList.Add(' line-height: normal;'); oList.Add(' vertical-align: middle;'); oList.Add('}'); oList.Free. ----------------- 2. How to use oList.Text...for Step3 at run-time ? 3. Grid1.JSInterface.JSCall('addCls', ['customGrid']); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 9, 2023 Share Posted January 9, 2023 Hello, Why don't you use it at design time? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 10, 2023 Share Posted January 10, 2023 15 hours ago, newsanti said: 2. How to use oList.Text...for Step3 at run-time ? Also you can use this approach: Quote Link to comment Share on other sites More sharing options...
newsanti Posted January 11, 2023 Author Share Posted January 11, 2023 18 hours ago, Sherzod said: Also you can use this approach: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}")'); end; How to remove css for memory management? Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 12, 2023 Share Posted January 12, 2023 On 1/10/2023 at 8:50 PM, newsanti said: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}")'); end; How to remove css for memory management? UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}", "customId")'); UniSession.AddJS('Ext.util.CSS.removeStyleSheet("customId")'); 1 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.