Jump to content

TUniFileUploadButton border does not resized.


JamesP

Recommended Posts

Hello,

There is an issue how TUniFileUploadButton is rendering on a screen. It looks awkward when frame or form is sized/resized.

The issue could be easy be replicated (I am using Professional full license 1.90.0.1565):

Main form -> AlignmentControl: uniAlignmentClient (even if it's uniAlignmentServer the same issue)

Drop uniPanel with Aligh = alTop; Layout = fit; and then insert TUniFileUploadButton (Align = alClient) on this uniPanel

Firstly, it shows like that, but if you try resize the form, please see next screen:

image.png.bb765be7d790e62941d1565c86055638.png

 

image.thumb.png.fad2a1ec6271264beb85f2364a9c9b48.png

 

Could you please advise how it could be fixed, so after resize the TUniFileUploadButton border will resize to fit whole Panel, and Caption be in the center of button?

Thank you in advance.

Kind Regards.

 

Link to comment
Share on other sites

Hi Sherzod,

Thank you. It works now as expected. I have added this line as suggested:

  UniFileUploadButtonDD.JSInterface.JSAddListener('afterrender', 'function(){var btn=this.button; if (btn) {btn.setStyle({width: "auto", display: "flex", "justify-content": "center"})}}');

 

Could you please suggest further on this, as I can't change the font-size for Caption "Drop Image file or click here to Append Image from Local PC / Network"?:

image.png.1f2038d72e0926f18fbfafdfb4b5bc12.png

It's 16 px, I want to change it to 12px. I have tried this approach, but it did not work.

  UniFileUploadButtonDD.JSInterface.JSAddListener('afterrender', 'function(){var btn=this.button; if (btn) {btn.setStyle({width: "auto", display: "flex", "justify-content": "center", "font-size": "12px"})}}');

Thank you in advance.
Kind Regards.

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...