ThemedControls - suggestions

Nov 3, 2008 at 10:02 PM

Hi Emerson,
I am interested in the ThemedControls project for some time.
The GUI looks pretty and as we can see, every release iteration is better than the previous one.

So, here are some suggestions and comments to the project.

(1) ThemedControls and OutlookNavBar
There were declared some time ago that this project should be internally divided into two independent parts.ThemedControls is part of theming/skinning to achieve the desired appearance, and the corresponding behavior. OutlookNavBar is a specific object (control), to achieve required navigation functionality.
Therefore I have expected:
(a) We will have a library as BaseThemedControls.vcx with classes corresponding to each base VFP visual class. Some classes are based on the same VFP base class with added theming (form, container,...), others imitate VFP base classes (commandbutton, label,...).
(b) Next library is for some complex controls, as the outlook navigation bar or explorer bar are.
(c) OutlookNavBar as an composite control, should be based on the themed controls as BaseThemedButton, BaseThemedLabel, BaseThemedCheckbox, BaseThemedContainer and others. At present, parts of the OutlookNavBar are created from scratch. Each part in the OutlookNavbar.vcx is based on the VFP base class instead on the class of ThemedControls.vcx library.

(2) Elements of the Objects
Why the similar elements aren't created similar way with the same names and processing?
(a) There is shpTransparent in the PanelButon/OverflowPanelButon in OutlookNavbar.vcx
    Its .Click() event call This.Parent.ChangeSelectedButton()
(b) There is shpMouseHandler in the ExplorerGroup in  ExplorerBar.vcx 
    Its .Click() event call This.Parent.Clicked()
(c) There is shpClickHandler in the Title in ToolBox.vcx
    Its .Click() event method contains all the behavior code, but begins with clausule "With This.Parent"

(3) OverflowPanelButton in OutlookNavBar.vcx
The OverflowPanelButton class has the option of the extended functionality. See methods .ChangeSelectedButton(), .FillMenu(), .Init() and the condition Upper(This.Name)=="MENUBUTTON". Thus, each button can now operate as a menubutton. I don't know why. There is the only instance of the menubutton in the OverflowPanel. I think, the new MenuButton class based on the OverflowPanelButton would by better solution. Or even better is to move the whole MenuButton functionality to the container of the buttons.

(4) OverflowPanelButton and PanelButton in OutlookNavBar.vcx
Both buttons are very similar. So they should use the same class or superclass with some differences added. The same is valid for their container classes.

(5) The parts of the controls
I think, the parts of the controls are sometimes too close interrelated and they know too much about internal structure another parts. Often the child objects send messages to the children objects of the another objects (or change their properties). It breaks the encapsulation of the objects, communication of the objects is less clear, and the classes are is not easy modificable.
See the references with This.Parent.Parent in some methods.

I will be glad, if this contribute to your project.
Stefan Stehlik

Nov 10, 2008 at 11:17 AM
Hi Stefan!
Of course your suggestions will contribute to ThemedControls project.
I agree with you and will try to redesign the controls in the future to apply your valuable suggestions
Thanks a lot!