Jump to content

TuniEdit.maxLength


pedrisco

Recommended Posts

TuniEdit doesn't consider the changes made to maxlength in runtime, it just keep considering the design time assigned value.

 

For now try this:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniSession.AddJS(UniEdit1.JSName+'.inputEl.dom.setAttribute("maxLength", "10");'+
                   UniEdit1.JSName+'.maxLength=10;'
  );
end;
Link to comment
Share on other sites

Thanks Delphi Developer

actuallly i tricked it with js by now, just like you suggest.

i've tested with 0.99.96.1322.

and btw, just for people that will use this trick... the first line does restricts the maximum length and the second avoids the warning hint about exceeding the limit, so you need both.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...