Interface
uses Suggestions,MyOwnIdeas;
type
TAdvanced: class(TCurrentDialogAsItIs_WrittenByMattias);
TNewPage: class (TAnotherPage);
QuickBuildOptionsRadioGroup: TRadioGroup; // As suggested by Mattias
IDE_LCL_WidgetSet: TComboBox; // Populated as the Radiogroup of
the Advanced page (or with a reduced set - just IDE supported widgetsets)
Target_LCL_WidgetSet: TComboBox; // Populated as the Radiogroup of
the Advanced page
{ For beginners the LCL choice is sometimes confusing - two choices, one
for the IDE LCL, and one for the Target application LCL could be easier
to understand. Moreover this would avoid the annoying situation which
comes from having selected fpgui or qt to compile the LCL, then rebuild
the IDE forgetting to change widgetset, and come out with an IDE which
won't start}
end;
Implementation
uses WhatIsAlreadyThere,ALotOfPatience;
Here's where problems arise. The existing Dialog is composed by a Form
with Autosize set to True, and objects properly anchored, so that
resizing the form will resize and reposition objects in an orderly
manner, while resizing objects (such as ItemsListBox) will increase form
size to properly accommodate everything.
My first attempt has been with a notebook and a bottom panel (to keep
the Compile/Save/Cancel buttons).
Form resizing works properly with gtk2, but doesn't work properly with
gtk1 (horizontal resize widens the anchored objects, vertical resizing
just adds blank space to the bottom of the notebook page).
Resizing ItemsListBox doesn't work. The notebook page (and the form)
isn't resized, the extra space is added or subtracted from the height of
the first widget which doesn't have a size constraints property to keep
it from changing (in our case the Target Directory Combo Box).
Second attempt: faking a notebook with Panels: one Top Aligned with two
buttons (Quick Options and Advanced) which are properly enabled and
disabled, so that only the correct option is available, one Bottom
Aligned with Compile/Save/Cancel, and a central panel, where Quick and
Advanced options are hidden or made visible.
Form resizing works properly both with gtk1 and gtk2, but ItemsListBox
resizing behaves exactly as in the other case.
I'm afraid that I'm against a logical limitation. In order to have my
Panel, or Notebook, follow the form resize, it must be Client Aligned.
This means that whenever the form is resized, the panel is notified.
To have my Panel to autosize, it must notify the form whenever it
requires a size change. But doing that would create a circle: A is
resized and notifies B, which is resized and notifies A, which is
resized, etc.
I've reached the conclusion that autosizing can work properly only in a
form, and not in a Client aligned object contained in a form.
Am I missing something? There's some anchoring trick which could do the job?
Or should I take a completely different approach, i.e. just a form, with
properly anchored widgets, hidden or made visible in order to create
two different pages? Sort of Quick Page makes visible only the objects
with Tag = 0, Advanced Page only objects with Tag = 1?
Waiting for competent advice
Giuliano
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives