Delphi fluid shape mockup

We have developed software. In this software, we show and hide several controls on different input screens depending on different situations.

When we hid the control, what happens is that the space occupied by this control remains as it is, and the layout looks very bad at times. on screens with lots of controls. Our client does not like this and asked us to do something.

My question is: is there a way by which we can create Fluid layouts so that when the control is hidden, the rest of the controls are automatically adjusted to fill the empty space left by the control, and when the control is displayed, they should automatically give way place of management and adjust them accordingly.

I know that we can achieve this by coding, but it will take a lot of code on each screen to set up the layout. I am looking for something that will reduce the coding on each screen, as there are more than 80 screens.

Please suggest some way that is a lesser mistake and can get rid of unnecessary coding on each input screen.

+8
layout delphi fluid
source share
5 answers

I think your best option is to use a component that processes the layout of your vcl controls in your form at runtime (depending on the conditions that you define). I recommend you try Devexpress ExpressLayout Control

You can find two great demos here

alt text
(source: devexpress.com )

You can check these features.

Auto-control - control groups and individual controls are automatically controlled by the layout control. You never worry about pixel-by-pixel positioning.

Auto form size - The form can be automatically resized to fit its content best.

Goodbye.

+9
source share

Now I'm not sure how complicated the layout you have, but I think you can use TFlowPanel and / or TGridPanel for this. Flowpanel has a pleasant handling of components that change visibility. I'm not sure how well the gridpanel handles the same ...

+4
source share

What types of controls do you dynamically hide, and what do you mean with autocomplete?

I donโ€™t know how simple it is: set the controls in the panel and use align alTop / alClient / alBottom. When you hide a panel, all other panels automatically move up. One of the problems: if you want to display the panel again, sometimes the panel can be screwed up ... It can be fixed manually by setting the .Top property or โ€œhideโ€ by setting .Height: = 1;

+1
source share

What would I do with a complex layout, actually split it into several tabs. This has two advantages. This simplifies the layout of the form and allows you to display and hide whole tabs depending on the choice made on other tabs.

0
source share

Raize Components has a TRzFlowPanel interface component. This is exactly what you need.

Use the TRzFlowPanel to place an empty flow panel on the form. The main difference between a traditional panel and a flow panel is how you control the controls. Using a traditional panel, you place a control (for example, a button) in a specific place. You can freely move this control anywhere in the panel with the mouse. On the flow panel, each control is placed in a specific place, regardless of where you place it with the mouse. Automatic location is controlled by the FlowStyle property. For example, using the default FlowStyle property LeftRightTopBottom, the first control that you add to the stream pane is anchored to the upper left corner. The second control that you add next to the first control, etc.

0
source share

All Articles