Recent

Author Topic: [SOLVED] How do I design large web page-like forms in the IDE?  (Read 6621 times)

JD

  • Hero Member
  • *****
  • Posts: 1848
[SOLVED] How do I design large web page-like forms in the IDE?
« on: February 26, 2014, 06:17:18 pm »
Hi there everyone,

I'm trying to design a large form that will be similar to a web page horizontal & vertical scroll bars to access off-screen controls. Though the scrollbars work at runtime, the problem is the scroll bars don't work in designtime. This makes the placing of controls in the off screen region at designtime rather difficult.

Is it possible to enable designtime scrolling?

Thanks,

JD
« Last Edit: February 27, 2015, 06:27:31 pm by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: How do I design large web page-like forms in the IDE?
« Reply #1 on: February 21, 2015, 08:20:32 pm »
I"m back to this problem again as it is the only solution I have for users with different computer screen sizes. Iis is almost like having a responsive Lazarus application where the middle panel stays a constant size & the left & right panels enlarge & shrink depending on the size of the window.

I was inspired to try this based on the design of some web sites.

Has anyone ever tried this?

JD
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How do I design large web page-like forms in the IDE?
« Reply #2 on: February 21, 2015, 10:12:34 pm »
I don't like scrolled forms. What widgetset do you use ?

Basile B.

  • Guest
Re: How do I design large web page-like forms in the IDE?
« Reply #3 on: February 21, 2015, 11:43:40 pm »
A few years back i had a discussion with someone about this. The trick to be able scroll at design time is to set the scrollbar values in the inspector.

If they are not visible then publish them in a sub component and prevent component streaming with a stored false specifier.

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: How do I design large web page-like forms in the IDE?
« Reply #4 on: February 22, 2015, 09:11:57 am »
I don't like scrolled forms. What widgetset do you use ?

 :D How then do you use the Internet? They are all over the place. As for the widgetset, I use Windows & GTK2 on Linux.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: How do I design large web page-like forms in the IDE?
« Reply #5 on: February 22, 2015, 09:13:40 am »
A few years back i had a discussion with someone about this. The trick to be able scroll at design time is to set the scrollbar values in the inspector.

If they are not visible then publish them in a sub component and prevent component streaming with a stored false specifier.

Do you have an example somewhere I can look at? Thanks.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

Basile B.

  • Guest
Re: How do I design large web page-like forms in the IDE?
« Reply #6 on: February 22, 2015, 10:28:01 am »
No. Too old, i just remember the discussion took place on S.O and (it was about the FMX scrollbox) something like 1 or 2 monthes after XE2 release...

But the idea is simple, if the scrollbar positions are published then you can edit them in the inspector.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: How do I design large web page-like forms in the IDE?
« Reply #7 on: February 22, 2015, 11:53:17 am »
I don't like scrolled forms. What widgetset do you use ?
:D How then do you use the Internet? They are all over the place. As for the widgetset, I use Windows & GTK2 on Linux.

That's wrong also.
Webdesigners should use an approach called "Liquid Design", where text flows freely inside the viewport of the browser.
Horizontal scrollbars (in the absence of wide elements like pictures) are a symptom of "pixel-perfect" WYSIWYG attempts in webdesign.
You (the webdesigner in this case) have absolutely no control over what I see on my device with my browser, but you think you have (because you think everybody uses MS Windows with IE >= 11 and a > 21" screen with the same insane high resolution as you).

And don't even get me started on catering for the visually impaired or other non-sensical visual "styles" (If I wanted to have my scrollbars screemingly pink, I would have told my OS/WindowManager to do so).

As for applications: please, please, pretty please: try to avoid horizontal scrollbars, as long as this can be done in a reasonable way. Try to avoid scrollbars (both horizontal and vertical) in dialogs.

Bart

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How do I design large web page-like forms in the IDE?
« Reply #8 on: February 22, 2015, 01:09:49 pm »
I don't like scrolled forms. What widgetset do you use ?

 :D How then do you use the Internet? They are all over the place. As for the widgetset, I use Windows & GTK2 on Linux.

I'm talking about nonweb applications, eg. Lazarus GUI apps.

z

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4474
  • I like bugs.
Re: How do I design large web page-like forms in the IDE?
« Reply #9 on: February 22, 2015, 01:59:29 pm »
There are 2 different issues. One is GUI design standards and one is better design time support for LCL ScrollBars.
I remember having that problem with ScrollBars in ScrollBox. Its main purpose is to scroll so yes, the design time support should be better.
Do new Delphi versions improve the design time experience? I don't have any recent Delphi now.

I have no idea how it should be implemented. Should there be another design time scrollbar drawn somewhere? Where? Would it require ugly hacks in designer code?
If somebody wants to work on this issue, I am interested to help.

I agree with Bart about web page designs but it is a different issue.
For example I have difficulties reading small newspaper text now without glasses. I like to read various articles with iPad because I can zoom the text. There are pages which cannot be zoomed and I just skip them. I will not fetch my glasses only because of some poorly designed pages.
They lost at least one reader because of their poor design.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How do I design large web page-like forms in the IDE?
« Reply #10 on: February 22, 2015, 02:06:52 pm »
There are 2 different issues. One is GUI design standards and one is better design time support for LCL ScrollBars.
I remember having that problem with ScrollBars in ScrollBox. Its main purpose is to scroll so yes, the design time support should be better.
Do new Delphi versions improve the design time experience? I don't have any recent Delphi now.

I have no idea how it should be implemented. Should there be another design time scrollbar drawn somewhere? Where? Would it require ugly hacks in designer code?
If somebody wants to work on this issue, I am interested to help.

IMO, it probably can be fixed at widgetset level. You can change tabs by click during desing time in TPageControl, so scrollbars can be
movable too (probably with side effects).... WSWidget.GetDesignInteractive .... in qt you can see in TQtDesignWidget.DesignControlEventFilter.

JD

  • Hero Member
  • *****
  • Posts: 1848
How do I design large web page-like forms in the IDE?
« Reply #11 on: February 27, 2015, 06:26:53 pm »
I finally solved the problem by using TScrollBox. The application's form looks good on screens of various sizes. I've tested it on Windows & on Linux and I'm satisfied with it. Thanks for all your contributions & your ideas.

JD
« Last Edit: February 27, 2015, 06:42:04 pm by JD »
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

 

TinyPortal © 2005-2018