JamesP Posted June 14, 2023 Share Posted June 14, 2023 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: 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 14, 2023 Share Posted June 14, 2023 Hello, @JamesP These posts may help you: Quote Link to comment Share on other sites More sharing options...
JamesP Posted June 15, 2023 Author Share Posted June 15, 2023 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"?: 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 15, 2023 Share Posted June 15, 2023 11 minutes ago, JamesP said: 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"?: This post may help you: Quote Link to comment Share on other sites More sharing options...
JamesP Posted June 15, 2023 Author Share Posted June 15, 2023 12 minutes ago, Sherzod said: This post may help you: Thank you very much. It works like a charm 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.