Jump to content

How to TunimMemo text alignment center at run-time?


newsanti

Recommended Posts

3 minutes ago, Sherzod said:
procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  UnimMemo1.JSInterface.JSConfig('textAlign', ['center']); //'left', 'center', 'right'
end;

 

image.png.0cb52335169cf8aa7b1b676b1328221f.png

Run-Time...

      var oMemo:= oForm.UnimMemo1;
      oMemo.Color:= oTask.TagColor1;
      oMemo.Font.Color:= oTask.TagColor2;
      oMemo.Font.Size:= 20;
      oMemo.JSInterface.
      JSConfig('textAlign', ['center']); //'left', 'center', 'right'

 

Link to comment
Share on other sites

19 minutes ago, Sherzod said:

This post may help you:

 

constructor TsmswUnimWebSpaceWS666A100BodyItem78Frame101.Create(
  AOwner: TComponent);
begin
  inherited Create(AOwner);
  var oMemo:= UnimMemo1;
  oMemo.JSInterface
  .JSAddListener('painted', 'function(me){'+
  'me.inputElement.applyStyles('''+oMemo.Font.ToString(True, False, True) +''');'+
  'me.inputElement.setStyle("line-height", me.inputElement.getStyle("font-size"));'+
  'me.inputWrapElement.setStyle("border", "none");'+
  '}');
end;
 

This code not working. for overlap.

image.png.7ac92c2bb27cd7d5e4f02b42b42011f8.png

Link to comment
Share on other sites

28 minutes ago, Sherzod said:

This post may help you:

How to run-time applyStyle of TunimMemo?

      var oMemo:= oForm.UnimMemo1;
      oMemo.Color:= oTask.TagColor1;
      oMemo.Font.Color:= oTask.TagColor2;
      oMemo.Font.Size:= 20;
      oMemo.JSInterface
        .JSProperty('textAlign', ['center'], 'setTextAlign'); //'left', 'center', 'right'
      >> ??? for ApplyStyle

 

Link to comment
Share on other sites

1 hour ago, Sherzod said:

Ok. Try simply use this solution for now:

CustomCSS -> 

.x-textareafield textarea {
   line-height: normal !important;
}

 

Working. Thanks.

How to editing vertical center?

image.png.a3f515118f73238b924192c07d77461e.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...