view container height

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
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

view container height

Post by wadhwani »

When building a web page with an app bar, app drawer and view container, the height of the view container appears to be restricted to the height of the browser. When building a page can can work on desktop and mobile, in some cases I would like to have my view longer than height of phone screen so users can scroll down. I don't think I am able to do that. I can only make dialogs longer than screen height and allow user to scroll down.

Can anybody offer any ideas on how to make container height larger dynamically based on device = mobile? On the web page source code, even if you try and change the viewcontainer height to something large, after you hit save it goes back down to 719 in my case.

Any help would be greatly appreciated.

Thanks
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: view container height

Post by Dino »

Hi

Perhaps using a Panel will be a suitable solution. This will be my view using a panel and a few floating buttons distributed in an view 3000 pixels tall.
j16.jpg
j16.jpg (24.51 KiB) Viewed 16571 times
Note that I used HEIGHT(3000) for the View (or the BEGIN_COM line), added a Panel to the view and set to fit Both, and enabled the Horizontalscroll(True) Verticalscroll(True) in the panel. The floating controls (round buttons) i use, where added to the panel.
j16source.jpg
j16source.jpg (128.44 KiB) Viewed 16571 times

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_VIEW) Displayposition(1) Tabposition(1) Caption('View2') Layoutmanager(#Layout1) Height(3000)

Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Alignment(TopCenter) Column(#Layout1Column1) Manage(#Panel) Parent(#Layout1) Row(#Layout1Row1)

Define_Com Class(#PRIM_PANL) Name(#Panel) Displayposition(1) Height(3000) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Width(300) Horizontalscroll(True) Verticalscroll(True)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button) Displayposition(1) Icon('add') Left(59) Parent(#Panel) Tabposition(1) Themedrawstyle('MediumTitle') Top(73)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button1) Displayposition(2) Icon('add') Left(190) Parent(#Panel) Tabposition(2) Themedrawstyle('MediumSuccess') Top(303)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button2) Displayposition(3) Icon('add') Left(59) Parent(#Panel) Tabposition(3) Themedrawstyle('MediumError') Top(589)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button3) Displayposition(4) Icon('add') Left(165) Parent(#Panel) Tabposition(4) Themedrawstyle('MediumAccent') Top(1224)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button4) Displayposition(5) Icon('add') Left(50) Parent(#Panel) Tabposition(5) Themedrawstyle('MediumTitle') Top(1720)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button5) Displayposition(6) Icon('add') Left(122) Parent(#Panel) Tabposition(6) Themedrawstyle('MediumAccent') Top(2304)
Define_Com Class(#PRIM_MD.ActionButton) Name(#Button6) Displayposition(7) Icon('add') Left(43) Parent(#Panel) Tabposition(7) Themedrawstyle('MediumSuccess') Top(2953)

End_Com
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

Re: view container height

Post by wadhwani »

Thanks Dino. Let me review and see if this works for me.
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

Re: view container height

Post by wadhwani »

One issue I see is that the AppDrawer seems to end at my screen height (1080). I am able to scroll down but the Appdrawer does not go all the way down. Any suggestions?
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: view container height

Post by Dino »

So, do you want to be able to scroll in the AppDrawer, like to have 100 options in that AppDrawer, and not just in the views?

not really sure of understand the question... I added a lot more of MenuItems in the App Drawer, and I can scroll both in the VL interface as in the final application
j16scroll.jpg
j16scroll.jpg (123.43 KiB) Viewed 16559 times

Code: Select all

* Controls - App Drawer
Define_Com Class(#PRIM_MD.AppDrawer) Name(#AppDrawer) Displayposition(2) Parent(#COM_OWNER) Tabposition(2) Top(56) Height(744) Layoutmanager(#LayoutAppDrawer) Themedrawstyle('MediumTitle') Width(220)
Define_Com Class(#PRIM_MD.Menu) Name(#Menu) Displayposition(1) Height(744) Parent(#AppDrawer) Showselection(False) Tabposition(1) Verticalscroll(True) Width(220)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemContact_Us) Caption('Contact Us') Displayposition(1) Left(0) Parent(#Menu) Tabposition(1) Tabstop(False) Top(0) Width(202) Height(48) Icon('view_quilt') View(#Contact_Us)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView2) Caption('View2') Displayposition(19) Left(0) Parent(#Menu) Tabposition(19) Tabstop(False) Top(864) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView3) Caption('View3') Displayposition(20) Left(0) Parent(#Menu) Tabposition(20) Tabstop(False) Top(912) Width(202) Height(48) Icon('view_quilt') View(#View3)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemSettings) Caption('Settings') Displayposition(21) Left(0) Parent(#Menu) Tabposition(21) Tabstop(False) Top(960) Width(202) Height(48) Icon('settings') Themedrawstyle('TopDivider') View(#Settings)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemSignOut) Caption('Sign Out') Displayposition(24) Left(0) Parent(#Menu) Tabposition(24) Tabstop(False) Top(1104) Width(202) Height(48) Icon('exit_to_app')
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemQuickLinks) Caption('Quick Links') Displayposition(22) Left(0) Parent(#Menu) Tabposition(22) Tabstop(False) Top(1008) Width(202) Height(48) Icon('help') View(#QuickLinks)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemAbout) Caption('About') Displayposition(23) Left(0) Parent(#Menu) Tabposition(23) Tabstop(False) Top(1056) Width(202) Height(48) Icon('info') Dialog(#About)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView20) Caption('View20') Displayposition(18) Left(0) Parent(#Menu) Tabposition(18) Tabstop(False) Top(816) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView21) Caption('View21') Displayposition(17) Left(0) Parent(#Menu) Tabposition(17) Tabstop(False) Top(768) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView22) Caption('View22') Displayposition(16) Left(0) Parent(#Menu) Tabposition(16) Tabstop(False) Top(720) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView23) Caption('View23') Displayposition(15) Left(0) Parent(#Menu) Tabposition(15) Tabstop(False) Top(672) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView24) Caption('View24') Displayposition(14) Left(0) Parent(#Menu) Tabposition(14) Tabstop(False) Top(624) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView25) Caption('View25') Displayposition(13) Left(0) Parent(#Menu) Tabposition(13) Tabstop(False) Top(576) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView26) Caption('View26') Displayposition(12) Left(0) Parent(#Menu) Tabposition(12) Tabstop(False) Top(528) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView27) Caption('View27') Displayposition(11) Left(0) Parent(#Menu) Tabposition(11) Tabstop(False) Top(480) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView28) Caption('View28') Displayposition(10) Left(0) Parent(#Menu) Tabposition(10) Tabstop(False) Top(432) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView29) Caption('View29') Displayposition(9) Left(0) Parent(#Menu) Tabposition(9) Tabstop(False) Top(384) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView30) Caption('View30') Displayposition(8) Left(0) Parent(#Menu) Tabposition(8) Tabstop(False) Top(336) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView31) Caption('View31') Displayposition(7) Left(0) Parent(#Menu) Tabposition(7) Tabstop(False) Top(288) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView32) Caption('View32') Displayposition(6) Left(0) Parent(#Menu) Tabposition(6) Tabstop(False) Top(240) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView33) Caption('View33') Displayposition(5) Left(0) Parent(#Menu) Tabposition(5) Tabstop(False) Top(192) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView34) Caption('View34') Displayposition(4) Left(0) Parent(#Menu) Tabposition(4) Tabstop(False) Top(144) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView35) Caption('View35') Displayposition(3) Left(0) Parent(#Menu) Tabposition(3) Tabstop(False) Top(96) Width(202) Height(48) Icon('view_quilt') View(#View2)
Define_Com Class(#PRIM_MD.MenuItem) Name(#MenuItemView36) Caption('View36') Displayposition(2) Left(0) Parent(#Menu) Tabposition(2) Tabstop(False) Top(48) Width(202) Height(48) Icon('view_quilt') View(#View2)
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

Re: view container height

Post by wadhwani »

On your screen shot sample, you show the appdrawer goes all they way down to the length of the view window. In my case, the appdrawer ends at 1080 height and is blank from that point to the bottom of the scroll page container length. Hope that make sense. In the web page design, the appdrawer is set to fit height of row3.
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: view container height

Post by Dino »

In the webpage I actually have the Appdrawer at 744

Code: Select all

Define_Com Class(#PRIM_MD.AppDrawer) Name(#AppDrawer) Displayposition(2) Parent(#COM_OWNER) Tabposition(2) Top(56) Height(744) Layoutmanager(#LayoutAppDrawer) Themedrawstyle('MediumTitle') Width(220)
and its adjusted automatically by the layout.

Code: Select all

Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMainItem2) Column(#LayoutMainColumn1) Manage(#AppDrawer) Parent(#LayoutMain) Row(#LayoutMainRow2) Sizing(FitToHeight) Rowspan(2)
Maybe you can find another difference, comparing my code with your code.
See attached here a quick export of this example, that was created originally by the wizard at v15 epc150020.
QuickExport20210118151507.zip
(76.68 KiB) Downloaded 1387 times
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

Re: view container height

Post by wadhwani »

Something odd here. I imported your version and compared to mine. In my view, the panel does not show vertical scrollbar even though it it is checked on property. I used your view in my web page and everything is fine. Why would vertical scroll not show on my panel (even in design view)?
wadhwani
Posts: 13
Joined: Tue Jan 29, 2019 3:15 am

Re: view container height

Post by wadhwani »

Found the issue. Scroll bar only shows when you place the last action button far enough down the panel where bottom overlflows part 3000 px height you specify as height of panel. Don't know if that is the way it is supposed to work.
User avatar
Dino
Posts: 472
Joined: Fri Jul 19, 2019 7:49 am
Location: Robbinsville, NC
Contact:

Re: view container height

Post by Dino »

interesting! glad you find it and can now make it work.
Post Reply