Jump to content

Google Forms Creator


Kattes

Recommended Posts

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.

 

GF_Question.png

Link to comment
Share on other sites

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;

 

  • Like 1
Link to comment
Share on other sites

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)?

Link to comment
Share on other sites

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;

 

Link to comment
Share on other sites

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

Clipboard01.png

Clipboard02.png

Clipboard03.png

Link to comment
Share on other sites

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?

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