Using the v14SP1 Layout Manager I noticed that there is an option option for units called contents. I built a page
Row 1 Fixed (Header)
Row 2 Proportional (Body)
Row 3 Contents (Error Messages RP)
Row 4 Fixed (Footer)
The idea being that Row 3 is not visible when it has no contents (ie no error messages). If Row 33 is set to Fixed this all fits neatly on the page albeit with the messages area taking up room.
When Contents is used however the layput goes haywire. Header and Footer are locked to the bottom of the screen, scrolling down shows the body is next but it is several times it actual size and the messages area is locked to the bottom of the last page.
Have I misunderstood the purpose of this setting or am I missing something. I can't find any references to Content in the documentation.
Layout Units=Content
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Layout Units=Content
The idea behind content sizing is much as you've understood it. Its primary purpose is to make a division resize based on the size and position of the controls within it.
Content sizing was introduced so that controls could resize based on their content at runtime, allowing for a more typical web page designs.
Without seeing you code, I can't be sure what's going on, but the behaviour sounds a little odd.
It might be simpler for the moment to use an attachment layout, with the header attached top, messages and footer attached bottom and body attached center.
Content sizing was introduced so that controls could resize based on their content at runtime, allowing for a more typical web page designs.
Without seeing you code, I can't be sure what's going on, but the behaviour sounds a little odd.
It might be simpler for the moment to use an attachment layout, with the header attached top, messages and footer attached bottom and body attached center.
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Layout Units=Content
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) LayoutManager(#AttachLayout1) Height(496)
Define_Com Class(#PRIM_ATLM) Name(#AttachLayout1)
Define_Com Class(#PRIM_ATLI) Name(#LayoutItem5) Attachment(Top) Manage(#Header) Parent(#AttachLayout1)
Define_Com Class(#PRIM_ATLI) Name(#LayoutItem6) Attachment(Bottom) Manage(#Footer) Parent(#AttachLayout1)
Define_Com Class(#PRIM_ATLI) Name(#LayoutItem7) Attachment(Bottom) Manage(#Messages) Parent(#AttachLayout1)
Define_Com Class(#PRIM_ATLI) Name(#LayoutItem8) Attachment(Center) Manage(#Body) Parent(#AttachLayout1)
Define_Com Class(#PRIM_LABL) Name(#Messages) DisplayPosition(2) Ellipses(Word) Height(38) Left(0) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Top(408) VerticalAlignment(Center) Width(1200) Caption('Messages') ThemeDrawStyle('LightTitle') Alignment(Center)
Define_Com Class(#PRIM_LABL) Name(#Body) Caption('Body') DisplayPosition(3) Ellipses(Word) Height(308) Left(0) Parent(#COM_OWNER) TabPosition(4) TabStop(False) VerticalAlignment(Center) Width(1200) Alignment(Center) ThemeDrawStyle('Title+MediumTitle') Top(100)
Define_Com Class(#PRIM_LABL) Name(#Header) Caption('Header') DisplayPosition(4) Ellipses(Word) Height(100) Left(0) Parent(#COM_OWNER) TabPosition(2) TabStop(False) Top(0) VerticalAlignment(Center) Width(1200) Alignment(Center) ThemeDrawStyle('Title+DarkTitle')
Define_Com Class(#PRIM_LABL) Name(#Footer) Caption('Footer') DisplayPosition(5) Ellipses(Word) Left(0) Parent(#COM_OWNER) TabPosition(3) TabStop(False) Top(446) VerticalAlignment(Center) Width(1200) Alignment(Center) ThemeDrawStyle('Title+MediumTitle')
Define_Com Class(#PRIM_LABL) Name(#ShowHideMessages) Caption('Show/Hide messages') DisplayPosition(1) Ellipses(Word) Height(40) Left(16) Parent(#COM_OWNER) TabPosition(5) TabStop(False) Top(30) VerticalAlignment(Center) Width(222) Alignment(Center) ThemeDrawStyle('Heading1+MediumTitle')
Evtroutine Handling(#ShowHideMessages.Click)
#Messages.Visible := *Not #Messages.Visible
Endroutine
End_ComRe: Layout Units=Content
Thanks for that but I really don't want to start again with the layout and design if what I've done should work - and it nearly does.
I've built a simple one page example that show the layout going haywire as soon as the content based item is made invisible and I've sent it to support.
I've built a simple one page example that show the layout going haywire as soon as the content based item is made invisible and I've sent it to support.
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: Layout Units=Content
We reproduced it today.
The fix will be available in the next EPC
Regards
The fix will be available in the next EPC
Regards
Re: Layout Units=Content
That's good news. It would be really helpful if an EPC that only applies to the IDE environment could be produced as at this time of year scheduling iSeries downtime is a serious nightmare.