It seems like everytime I create a widget in LWF, I can't get the widget to appear on my page without some level of scrolling.
I exported the html from the view & form builder and even took out everything I thought to be extraneous at the bottom of the page. But, alas, this didn't work.
Any tips or tricks on how to avoid the dreaded scrollbar?
Picture of one widget with scrolling attached.
This topic has been locked.
3 replies Latest Post - 2009-10-08T01:31:18Z by mburati
Pinned topic Anyway to create a widget without scrolling
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2009-10-08T01:31:18Z at 2009-10-08T01:31:18Z by mburati
ncarrier 060000TSHN11 Posts
mburati 060000VQ2030 Posts
mburati 060000VQ2030 PostsACCEPTED ANSWER
Re: Anyway to create a widget without scrolling2009-10-08T01:31:18Z in response to mburatiTo provide some closure on this thread, in case others run across it...
Martin and I talked to Nicole offline about this and it turns out that it was not specific to the model or table in use.
LWF and WPF widgets run in an IFrame which in turn gets its data from server side LWF/WPF runtime code.
Browsers seem to keep track of what the current or minimum size of an IFrame is, and if you try to shrink it from that size, they add scrollbars to let you get at the data you'd then be hiding (even if it's just blank/white space). I was able to reproduce the same issue with an almost blank hello world iframe widget which I first grew and then tried to shrink. The browser wouldn't even let me shrink it back to its original size without adding scrollbars.
There is a workaround, for those like Nicole that need smaller widget areas than the default 300 x 300 px size that LWF/WPF widgets default to.
If you want to change the minimum IFrame size, you can edit the template file for widget definitions. That's in your project under WebContent/WEB-INF/factory/xml_templates/widget/widget_definition.xml. The key lines look like this:
<iframe id="_IWID_frame#Mode#" name="_IWID_frame_#Mode#"
NOTE: it's usually not a good idea to modify out of the box LWF/WPF project files, because they then may be overwritten upon upgrade of the project and/or your changes may be kept over new improved functionality from LWF/WPF on upgrade of the project. But if you keep that in mind for the next time you upgrade, you should be able to change the min size of LWF/WPF widgets if you really need to, in order to meet yor UX requirements. We'll add an enh request asking that in a future release of WPF/LWF that these attributes of the widget may be set or overridden right in the Widget Adapter builder, rather than only in the iWidget template XML.
I hope that info helps,