Min-width & Padding

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
lansalata
Posts: 2
Joined: Wed Oct 12, 2016 7:12 pm

Min-width & Padding

Post by lansalata »

Hi,

I'm creating a Web Page and I would like to know if it is possible to:

- add a minimum width to a label
- add a left padding to an edit box

without having to create an external resource with a custom css.

Thanks
Fabio
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: Min-width & Padding

Post by Stewart Marshall »

Hi Fabio

Min and Max width can be defined for rows and columns in a layout. Controls that resize based on the height or width are then governed by the row or column as the page resizes.

Fields and edits have no internal padding at present. Please forward this as an enhancement request to your regional support centre.

You can work around this today by parenting an edit to a panel made to look like an edit.

In the sample below, the edit is white with no borders and the parent panel is white with a single pixel border.

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Height(496) Width(696) Theme(#SYS_THEME<2015Blue>) Style(#Style1)
Define_Com Class(#PRIM_VS.Style) Name(#Style1) BackgroundBrush(#Brush1)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme50)

Define_Com Class(#PRIM_VS.Style) Name(#Style2) BorderBottom(1) BorderLeft(1) BorderRight(1) BorderTop(1) BackgroundBrush(#Brush2) CornerBottomLeft(3) CornerBottomRight(3) CornerTopLeft(3) CornerTopRight(3)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(255:255:255)

Define_Com Class(#PRIM_VS.Style) Name(#Style3) BorderBottom(0) BorderLeft(0) BorderRight(0) BorderTop(0)

Define_Com Class(#PRIM_PANL) Name(#Panel1) DisplayPosition(1) Left(16) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Top(16) Width(345) Style(#Style2)
Define_Com Class(#PRIM_EDIT) Name(#Edit1) DisplayPosition(1) Parent(#Panel1) ShowSelection(False) ShowSelectionHilight(False) TabPosition(1) Top(0) Height(48) Width(319) Left(24) Style(#Style3)

End_Com
Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
Post Reply