bahry Posted February 19, 2017 Share Posted February 19, 2017 Hi, Is there anyway I can limit the number of Characters entered in the UniMemo some thing like Maxlength ? and how can I display the remaining Characters? Regards Link to comment Share on other sites More sharing options...
mhmda Posted February 19, 2017 Share Posted February 19, 2017 Works like a charm.... 2 Link to comment Share on other sites More sharing options...
bahry Posted February 19, 2017 Author Share Posted February 19, 2017 Dear Mohammad, Very Thanks. Works like a charm.... Link to comment Share on other sites More sharing options...
wprins Posted September 19, 2018 Share Posted September 19, 2018 Today I needed this feature. It would be better if TUniMemo exposed MaxLength as a property to control this. But thanks for this solution. Edit: Also setting the maximum length doesn't actually prevent the entry of more than the maximum length. It does colour the memo frame red and display a hover warning about the maximum length however. Is it possible to actually stop entry once the memo reaches capacity? Link to comment Share on other sites More sharing options...
Sherzod Posted September 19, 2018 Share Posted September 19, 2018 procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniMemo1.JSInterface do begin JSConfig('enforceMaxLength', [True]); JSConfig('maxLength', [50]); end; end; 1 Link to comment Share on other sites More sharing options...
wprins Posted September 19, 2018 Share Posted September 19, 2018 Sherzod, thank you. Out of interest, can one do the same via beforeInit()? (I assume so?) Link to comment Share on other sites More sharing options...
Sherzod Posted September 19, 2018 Share Posted September 19, 2018 18 minutes ago, wprins said: Sherzod, thank you. Out of interest, can one do the same via beforeInit()? (I assume so?) http://forums.unigui.com/index.php?/topic/11208-i-wish-unimemo-has-maxlength-propertity/&do=findComment&comment=59538 Link to comment Share on other sites More sharing options...
wprins Posted September 19, 2018 Share Posted September 19, 2018 Thanks, apologies, I should've found that myself. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now