[fpc-devel] Delphi XE2 uses FPC for iOS target

Max Vlasov max.vlasov at gmail.com
Thu Aug 18 11:09:44 CEST 2011


On Thu, Aug 18, 2011 at 1:57 AM, Graeme Geldenhuys
<graemeg.lists at gmail.com>wrote:

> On 15 August 2011 10:48, Michael Schnell wrote:
> >
> > I never tried this, but I feel that IDEs (integrating code editor, GUI
> > designer, make process, and debugger) have been invented for a purpose.
>
> I agree with all except the "gui designer" part. Layout Managers are
> by far the better choice compared to something like Delphi or Lazarus
> or MSEgui and even fpGUI's UI Designer gives. Java hit the nail on the
> head. Why define a UI with co-ordinates, then sit with problems like
> overlapping components, components that don't scale, locked to a
> specific DPI etc.
>


For my projects in Delphi I did this with a control that was inspired by
table layouts of HTML (I called it TControlAligner, it is a TGraphicControl
descendant without own drawing, its bounds are used as a "container"). It
has Controls property (TCollection descendant) and direction
(vertical/horizontal). Every collection item has a reference to a control on
the form (that can be simple control or another TControlAligner) and
different properties. The main property of the item that affects the
position is Cells which is either weight (equivalent of % of html tables) or
pixels, and when all requirements is set and this TControlAligner is placed
(or its bounds changed) it does the best it can do with all the requirements
of the collections items (as with html tables where cells can require % of
the width or exact pixels).

Adding new aligners and using it for items of another aligner can build very
complex layouts not using direct coordinates at all.  Seems like the port of
this component works in Lazarus. If the concept is worth considering I can
provide the source for further review by the developers.

Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20110818/55b3cacb/attachment.html>


More information about the fpc-devel mailing list