Page 1 of 1

How to break a field

Posted: Wed Aug 18, 2021 2:05 pm
by sohashi
Hi,

Display it in a browser using LANSA for the Web.
Is it possible to start a new line after entering characters in the field?
Please tell me who knows how.

Best Regards,
Shumpei Ohashi

Re: How to break a field

Posted: Thu Aug 19, 2021 11:34 pm
by Dino
If you check the example in the home page of Visual LANSA IDE, under
"Explore Material Design Controls" (xmdmain web page), go to text fields,
you will see an example using what it calls variable height field box:

Image

Opening the web page, following the link to the view xMdTextFields
You can see the fields for the screen are defined like this, note the Multiline(True):

Code: Select all

Define_Com Class(#PRIM_MD.Edit) Name(#Edit9) Displayposition(2) Caption('Label') Left(20) Parent(#Panel8) Tabposition(2) Top(127) Width(288) Appearance(TextFieldAreaBox) Multiline(True) Height(58) Helperposition(None)

Define_Com Class(#PRIM_MD.Edit) Name(#Edit15) Displayposition(3) Caption('Label') Left(20) Parent(#Panel8) Tabposition(3) Top(195) Width(288) Appearance(TextFieldAreaBox) Multiline(True) Height(58) Helperposition(None)

Re: How to break a field

Posted: Fri Aug 20, 2021 7:12 am
by adale
Not sure if this will help or if it is what you are asking for, but when I want my text (text in a field, or a caption for a label) to be with a line break, below is what I have done. the + (10).asUnicodeString is the line break.

* Two line caption label. Need to adjust caption row sizing.
* #TextContactUs := "Contact Us" + (10).asUnicodeString + "Now you fool."

This will now have the Text field #TextContactUs show as:

Contact Us
Now you fool.