Hi all

 

I wonder whether this might be useful and/or of interest - it can be
downloaded here:

https://drive.google.com/drive/folders/1v_JUnY-o0jJY-WvpW6N0rO2O7GolFKRd?usp
=sharing

 

Paul Newton

 

Forms layout manager (FLM)

 

Description

 

This is a small utility that enables saving and restoring of form layouts.

 

Many of you will have come across situations where the controls on a form
are shuffled around at runtime.  In  order to achive this, the developer
will have to work with one form design and then adjust TOP and LEFT for a
number of controls by implementing code to make the runtime adjustments.
But all the time, in design mode they only see one layout.

 

What if you could have one form (SCX) but have two different views of it at
design time and implement either or both designs at run time (i.e. expose
one design or the other for the user, or even let the user switch between
the two different layouts). 

 

What if all of this could be achieved more or less effortlessly and with no
need to remember and or calculate object positions?

 

Welcome to the Forms layout manager.

 

How it works

 

Start with a form design, say "Expanded".  Run the Forms layout manager and
have it store the positions of all the objects at the form level.  These
will be stored in a table (well I never) and the same table will be used for
all forms and all form designs.

 

At the same time that the form design is being saved, FLM can also generate
code to reposition the controls at runtime.

 

Now modify the form design, reposition the controls, make the form larger or
smaller and so on. Let's call this design "Compact".  Let FLM save the new
layout and generate the code to reproduce the layout at runtime.

 

Now whenever you want to work in the form designer, and see in the designer
what the user will see, simply use FLM to restore the required layout
("Expanded" or "Compact"). In other words, when working in the form designer
you will see just one design, uncluttered by the controls in the other
layout.

 

At the moment, FLM only processes LEFT and TOP but it is designed in such a
way that other properties (e.g. WIDTH, HEIGHT, FILLCOLOR etc) could be
handled in the same way with minimal changes required in FLM.

 

I have not yet investigated whether the concept could be extended to classes
in a VCX.  One thing at a time ...



--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/008601d82efd$772bea80$6583bf80$@gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to