Kattes Posted December 2, 2019 Share Posted December 2, 2019 Hi, I am currently writing a UniGuiDB component that allows me to get all relevant information for creating forms from a database table. The result should come as close as possible to a Google Form. In this context I have two questions: With a memo field, the line spacing seems to be too small with larger fonts, or does not adapt to the font size. Is there a CSS trick to correct this? Google Form Edit fields only use the lower border lines of the input box Is there an elegant CSS solution for this? At the moment I'm helping myself with drawing an additional line in the Delphi code - so not so nice. Thank you for your support and with best greetings from Germany. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2019 Share Posted December 2, 2019 23 minutes ago, Kattes said: With a memo field, the line spacing seems to be too small with larger fonts, or does not adapt to the font size. Is there a CSS trick to correct this? Hi, What component are you using for this? Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 2, 2019 Author Share Posted December 2, 2019 Hi, It's a TUniMemo, using UniGuiVersion 1.50.0.1481 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2019 Share Posted December 2, 2019 1 hour ago, Kattes said: It's a TUniMemo Can you try this approach? procedure TMainForm.UniFormCreate(Sender: TObject); begin UniMemo1.JSInterface.JSAddListener('afterrender', 'function(){this.inputEl.setStyle("line-height", this.inputEl.getStyle("font-size"))}'); end; 1 Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 2, 2019 Author Share Posted December 2, 2019 Perfect Sherzod! This solves the first part of my problems ! Do you think that there is also a way to change TUniEdit so that the surrounding frame gets replaced by a single underline (as shown in the screen shot above)? Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 5, 2019 Author Share Posted December 5, 2019 Is there any chance to change the look of the TUniEdit via CSS, too? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 6, 2019 Share Posted December 6, 2019 10 hours ago, Kattes said: Is there any chance to change the look of the TUniEdit via CSS, too? If I am not mistaken, the forum had a similar question and solution. I will try to search too or give a solution. Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 9, 2019 Author Share Posted December 9, 2019 Do you have any news here? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 9, 2019 Share Posted December 9, 2019 4 hours ago, Kattes said: Do you have any news here? Sorry, not yet. Yes of course this is done using CSS. Also, I have not yet found a link with a solution that was on the forum. In any case, we will try to give you a solution. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 9, 2019 Share Posted December 9, 2019 7 hours ago, Kattes said: Do you have any news here? Maybe something like this? CustomCSS: .noborder { border: none; display: grid; } .focuscls { border-bottom-width: 1px; border-bottom-style: solid; } MainForm -> OnCreate: procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniEdit1.JSInterface do begin JSConfig('triggerWrapCls', ['noborder']); JSConfig('inputWrapFocusCls', ['focuscls']); end; end; Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 9, 2019 Author Share Posted December 9, 2019 Hi Sherzod, You are already on a good way to solve this puzzle and I really appretierte your effort, but when using the Default theme nothing has changed. I also tried with Crisp theme and here the complete box is disappearing, i.e I am getting only a white input field. The wanted underline only appears, when the edit field gets the focus (please see figures below). Best regards, Carsten Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 9, 2019 Share Posted December 9, 2019 10 minutes ago, Kattes said: You are already on a good way to solve this puzzle and I really appretierte your effort, but when using the Default theme nothing has changed. I also tried with Crisp theme and here the complete box is disappearing, i.e I am getting only a white input field. The wanted underline only appears, when the edit field gets the focus (please see figures below). Hi, Sorry if I initially misunderstood your question. Please, specify again how it should look? Quote Link to comment Share on other sites More sharing options...
Kattes Posted December 11, 2019 Author Share Posted December 11, 2019 Sure, the underline of the uniEdit has to be always visible, because otherwise you have no indication that there is any input field (if everything is white on white) Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 11, 2019 Share Posted December 11, 2019 7 minutes ago, Kattes said: Sure, the underline of the uniEdit has to be always visible, because otherwise you have no indication that there is any input field (if everything is white on white) Ok I will check. 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.