CAVeter Posted July 30, 2019 Share Posted July 30, 2019 hi UniEdit1.LayoutConfig.cls := '"dir="rtl"'; // <- No CLS available? ERROR please guide me, Thank you Quote Link to comment Share on other sites More sharing options...
mhmda Posted August 3, 2019 Share Posted August 3, 2019 You can't use it like this, it's a css class name, add the class to the server,odule->customcss and then use the name. Quote Link to comment Share on other sites More sharing options...
NizamUlMulk Posted September 5, 2019 Share Posted September 5, 2019 Is possible assign cls at runtime?. The property isn´t disponible for LayoutConfig... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 6, 2019 Share Posted September 6, 2019 9 hours ago, NizamUlMulk said: Is possible assign cls at runtime?. The property isn´t disponible for LayoutConfig... For which component did you want to set? Quote Link to comment Share on other sites More sharing options...
NizamUlMulk Posted September 13, 2019 Share Posted September 13, 2019 On 9/6/2019 at 12:34 AM, Sherzod said: For which component did you want to set? anyone. Now I seeing TuniToolButton 4 ex. Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 3, 2020 Share Posted April 3, 2020 On 9/5/2019 at 8:43 PM, NizamUlMulk said: Is possible assign cls at runtime?. The property isn´t disponible for LayoutConfig... @Sherzod, For UniDBGrid ( .cls property is protected ). Would like to use this : UniDbgrid1.LayoutConfig.Cls := 'myCustomCls'; At runTime ! because i have two behaviors for the same unidbgrid (Arabic Font are bigger then Latin Font). The logic would be : if Arabic then UniDbgrid1.LayoutConfig.Cls := 'ClsA' else UniDbgrid1.LayoutConfig.Cls := 'ClsL'; Thx. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 3, 2020 Share Posted April 3, 2020 20 minutes ago, Abaksoft said: if Arabic then UniDbgrid1.LayoutConfig.Cls := 'ClsA' else UniDbgrid1.LayoutConfig.Cls := 'ClsL'; Hi, You can also use like this: UniDBGrid1.JSInterface.JSCall('addCls', ['ClsA']); For remove: UniDBGrid1.JSInterface.JSCall('removeCls', ['className']); 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 3, 2020 Share Posted April 3, 2020 And during initialization something like this: procedure TMainForm.UniFormCreate(Sender: TObject); begin // if then UniDBGrid1.JSInterface.JSConfig('cls', ['ClsA']); end; Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted April 3, 2020 Share Posted April 3, 2020 This is another alternative before that properties been public. uses uniGUIVars,....... type AliCengiz_LayoutConfig = class(TUniCustomLayoutConfig); ..... procedure Tfrm_xxxx.UniLoginFormCreate(Sender: TObject); begin AliCengiz_LayoutConfig(xxxxx.LayoutConfig).Cls:= 'css-falan'; AliCengiz_LayoutConfig(yyyyy.LayoutConfig).BodyCls:= 'css-filan'; 1 Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 3, 2020 Share Posted April 3, 2020 1 hour ago, Sherzod said: Hi, You can also use like this: UniDBGrid1.JSInterface.JSCall('addCls', ['ClsA']); For remove: UniDBGrid1.JSInterface.JSCall('removeCls', ['className']); Thank you Sherzod, Not totally solved. Cls1 to Cls2 : works fine. but when I come back Cls2 to Cls1 : not works !? Sure i am missing something. Can you please examine my testCase ? Thx. cls_Runtime.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 3, 2020 Share Posted April 3, 2020 19 minutes ago, Abaksoft said: Sure i am missing something. UniDBGrid1.JSInterface.JSCall('removeCls', ['className']); className - Name of your class //ClsA or ClsB I guess Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 3, 2020 Share Posted April 3, 2020 9 minutes ago, Sherzod said: UniDBGrid1.JSInterface.JSCall('removeCls', ['className']); className - Name of your class //ClsA or ClsB I guess Oh...Sorry I thaught "className" was a JS property ! (to my great igorance) That woks fine now Thank again Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 3, 2020 Share Posted April 3, 2020 1 hour ago, Freeman35 said: This is another alternative before that properties been public. uses uniGUIVars,....... type AliCengiz_LayoutConfig = class(TUniCustomLayoutConfig); ..... procedure Tfrm_xxxx.UniLoginFormCreate(Sender: TObject); begin AliCengiz_LayoutConfig(xxxxx.LayoutConfig).Cls:= 'css-falan'; AliCengiz_LayoutConfig(yyyyy.LayoutConfig).BodyCls:= 'css-filan'; Thank you FreeMaaaaaan, Also, i will study your code 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.