jahlxx Posted July 8, 2016 Share Posted July 8, 2016 Hi. How set charcase property in tunimemo? Thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted July 8, 2016 Share Posted July 8, 2016 Hi, For now try this: 1. uses ... uniGUIJSInterface; 2. For example: procedure TMainForm.UniButton1Click(Sender: TObject); begin (UniMemo1 as IUniJSInterface).JSCall('setFieldStyle', ['textTransform:uppercase']); //(UniMemo1 as IUniJSInterface).JSCall('setFieldStyle', ['textTransform:lowercase']); //(UniMemo1 as IUniJSInterface).JSCall('setFieldStyle', ['textTransform:none']); end; Best regards. Quote Link to comment Share on other sites More sharing options...
M477H13U Posted June 4, 2018 Share Posted June 4, 2018 Hello again uniGUI users ! I tried your approach but it does not seems to work :/ I even tried: lUniMemo.JSInterface.JSCall('setFieldStyle', ['textTransform:uppercase']); Same result ! Any workaround ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 4, 2018 Share Posted June 4, 2018 Hello, You can use this config for this: function beforeInit(sender, config) { config.fieldStyle='text-transform:uppercase;'+config.fieldStyle; } In runtime (when an app is ready): lUniMemo.JSInterface.JSCall('inputEl.setStyle', ['textTransform', 'textTransform:uppercase']); //lowercase or none Quote Link to comment Share on other sites More sharing options...
M477H13U Posted June 4, 2018 Share Posted June 4, 2018 Hello ! (: First of all, thank you for the quick answer ! I just tested your solution and it does work perfectly at one little detail: When you close the memo Editor, the charCase is not respected : LowerCase while Edditing TUniMemo: OK . LowerCase when not edditing TUniMemo: NOK NB: Same behavior with lowerCase and UpperCase! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 4, 2018 Share Posted June 4, 2018 When you close the memo Editor, the charCase is not respected : LowerCase while Edditing TUniMemo: OK RespectedLowerCaseWhileEdditing.png. LowerCase when not edditing TUniMemo: NOK NotRespectedLowerCase.png NB: Same behavior with lowerCase and UpperCase! Sorry, can you explain in more details?! Quote Link to comment Share on other sites More sharing options...
M477H13U Posted June 5, 2018 Share Posted June 5, 2018 Sorry, can you explain in more details?! For sure! I am working in a DBGrid containing a field with fieldType = uftMemo. I would like that the contents on this memo is always set to LowerCase or UpperCase.. The solution you gave me is working only when I am editing the memo. When you get to the next cell in order to edit it, the memo (which is not focus anymore) does not respect the charCase configuration: Memo focused: Memo unFocused: Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 5, 2018 Share Posted June 5, 2018 Maybe this post can help you?: http://forums.unigui.com/index.php?/topic/10400-unidbgrid-selectedindex-e-charcase-uppercase/&do=findComment&comment=54441 Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 24, 2021 Share Posted August 24, 2021 On 6/4/2018 at 12:17 PM, Sherzod said: Hello, You can use this config for this: function beforeInit(sender, config) { config.fieldStyle='text-transform:uppercase;'+config.fieldStyle; } In runtime (when an app is ready): lUniMemo.JSInterface.JSCall('inputEl.setStyle', ['textTransform', 'textTransform:uppercase']); //lowercase or none @Sherzod this do not work in runtime( OnReady )... lUniMemo.JSInterface.JSCall('inputEl.setStyle', ['textTransform', 'textTransform:uppercase']); //lowercase or none Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2021 Share Posted August 25, 2021 Hello @mikromundo Please clarify the logic of your code again. Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 25, 2021 Share Posted August 25, 2021 @Sherzod thanks for answer... I found this post where you explain how to apply "uppercase" inside a uniMemo. you explain two ways: 1) with ExtJs(work's fine) 2) At runtime( do not work ) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2021 Share Posted August 25, 2021 Hello @mikromundo, Can you make a simple test app to check? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted August 25, 2021 Share Posted August 25, 2021 Sorry to waste your time , @Sherzod it´s worked. I'll see what I did wrong on the other project. Thanks !!! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 25, 2021 Share Posted August 25, 2021 Okay, no problem. Quote Link to comment Share on other sites More sharing options...
picyka Posted October 10, 2023 Share Posted October 10, 2023 Would it be possible to add a CharCase property to Memo and DB Memo components? 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.