Hi.
Is it possible to calculate the lenght of the content in field so I can set the width of the field in a RP?
/Klaus
Calculate the lenght of field contens
Re: Calculate the lenght of field contens
Isn't it curchars? You might have to add a trim in there.
https://docs.lansa.com/14/en/lansa016/p ... rchars.htm
https://docs.lansa.com/14/en/lansa016/p ... rchars.htm
Art Tostaine
Re: Calculate the lenght of field contens
Hi
Thanks.
it gives me the numbers of letters in the field.
I need the size in the format of width. I need it to make some kind of breadcrum, like:
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
If i just put the fields after each other I will get some space betweend the fields.
Klaus
Thanks.
it gives me the numbers of letters in the field.
I need the size in the format of width. I need it to make some kind of breadcrum, like:
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
If i just put the fields after each other I will get some space betweend the fields.
Klaus
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Calculate the lenght of field contens
I usually make breadcrumbs like that with labels flowing left to right with variable width....
Cheers,
Danny
Cheers,
Danny
Re: Calculate the lenght of field contens
Hi
thanks
But I still need to change the width of the labels so it is like
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
and not like :
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
My breadcrumbs could by VW or Mercedes I would like the > be just right to the eg VW > and Mercedes >
/Klaus
thanks
But I still need to change the width of the labels so it is like
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
and not like :
Home page > Services > About Us > Home page > Latest Newsletter > Home page > Page currently being viewed
My breadcrumbs could by VW or Mercedes I would like the > be just right to the eg VW > and Mercedes >
/Klaus
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Calculate the lenght of field contens
Hi Klaus,
Try the sample code below
Maybe this is what you want.
Cheers,
Danny
Try the sample code below
Maybe this is what you want.
Cheers,
Danny
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>) LayoutManager(#LayoutMain)
Define_Com Class(#PRIM_TBLO) Name(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMainColumn1) DisplayPosition(1) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMainColumn2) DisplayPosition(2) Parent(#LayoutMain) Width(20)
Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMainColumn3) DisplayPosition(3) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutMainRow1) DisplayPosition(1) Parent(#LayoutMain) Height(200) Units(Pixels)
Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutMainRow2) DisplayPosition(2) Parent(#LayoutMain)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem1) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Caption1) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem2) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Text1) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem3) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Caption2) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem4) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Text3) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem5) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Caption3) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem6) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Text5) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem7) Alignment(TopLeft) Column(#LayoutMainColumn2) Flow(Right) Manage(#Caption4) Parent(#LayoutMain) Row(#LayoutMainRow1) Sizing(ContentWidth)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem8) Alignment(TopLeft) Column(#LayoutMainColumn2) Manage(#Button1) Parent(#LayoutMain) Row(#LayoutMainRow2) Sizing(None) Flow(Right) MarginBottom(8) MarginLeft(8) MarginRight(8) MarginTop(8)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem9) Alignment(TopLeft) Column(#LayoutMainColumn2) Manage(#Button2) Parent(#LayoutMain) Row(#LayoutMainRow2) Sizing(None) Flow(Right) MarginBottom(8) MarginLeft(8) MarginRight(8) MarginTop(8)
Define_Com Class(#PRIM_MD.Label) Name(#Caption1) Caption('Home page') DisplayPosition(1) Left(55) Parent(#COM_OWNER) TabPosition(7) Top(0) Width(75)
Define_Com Class(#PRIM_MD.Label) Name(#Text1) Caption('>') DisplayPosition(2) Left(130) Parent(#COM_OWNER) TabPosition(3) Top(0) Width(11)
Define_Com Class(#PRIM_MD.Label) Name(#Caption2) Caption('Services') DisplayPosition(3) Left(141) Parent(#COM_OWNER) TabPosition(6) Top(0) Width(55)
Define_Com Class(#PRIM_MD.Label) Name(#Text3) Caption('>') DisplayPosition(4) Left(196) Parent(#COM_OWNER) TabPosition(2) Top(0) Width(11)
Define_Com Class(#PRIM_MD.Label) Name(#Caption3) Caption('About Us') DisplayPosition(5) Left(207) Parent(#COM_OWNER) TabPosition(4) Top(0) Width(61)
Define_Com Class(#PRIM_MD.Label) Name(#Text5) Caption('>') DisplayPosition(6) Left(268) Parent(#COM_OWNER) TabPosition(1) Top(0) Width(11)
Define_Com Class(#PRIM_MD.Label) Name(#Caption4) Caption('Latest Newsletter') DisplayPosition(7) Left(279) Parent(#COM_OWNER) TabPosition(5) Top(0) Width(114)
Define_Com Class(#PRIM_MD.RaisedButton) Name(#Button1) Caption('NEWSLETTER') DisplayPosition(8) Left(63) Parent(#COM_OWNER) TabPosition(9) ThemeDrawStyle('MediumTitle') Top(200)
Define_Com Class(#PRIM_MD.RaisedButton) Name(#Button2) Caption('MY ACCOUNT') DisplayPosition(9) Left(179) Parent(#COM_OWNER) TabPosition(8) ThemeDrawStyle('MediumTitle') Top(200)
Evtroutine Handling(#Button1.Click)
#Caption1 := 'Home page'
#Caption2 := 'Services'
#Caption3 := 'About Us'
#Caption4 := 'Latest Newsletter'
Endroutine
Evtroutine Handling(#Button2.Click)
#Caption1 := 'Home page'
#Caption2 := 'My Account'
#Caption3 := 'Latest Statements'
#Caption4 := 'May 2019'
Endroutine
End_Com
Re: Calculate the lenght of field contens
Hi
Thanks
That was what I needed.
/klaus
Thanks
That was what I needed.
/klaus