i've developed a splitterbar class and would like to receive some feedback about them.

features:
- anchor
- collapse/expand "panels"

download the post attachment file below and unzip them.
open the project and run form1, form2 and form3 samples.
try to "resize" the panels or click on the "arrows".

the class will only work with vfp 9.

please, send suggestions or report bugs.

this class is based on christof wollenhaupt class.

4 Responses to SplitterBar class

  • Juan Antonio Santana Medina says:

    Hi Emerson It´s good, but it only works with two objects and you have to use two different classes for vertical and horizontal splitters.

    What I would do is having a property that indicates it it´s a vertical or horizontal splitter, another one to check wether collapsing is allowed or not and one more for checking the collapsing status, so you do not have to check the caption of the label.

    To make it work with more that one object what you can try is looping the object collection of the splitter container (Splitter.Parent) and checking the relative position about the splitter. It will be at the left if Obj.Left<=Splitter.Left, at the right if Obj.Left>Splitter.Left, and so on.

    I will try to do what I´m writting.

    Cheers.

  • Emerson, te escribo en español. Me es más sencillo.

    La clase me parece muy útil, fácil de usar, fantástica. Gracias por compartirla.

    Un detalle que he observado: cuando deba colocarse un objeto que no posea la propiedad Anchor, (como un grid), debería poderse ampliar sus dimensiones de acuerdo al tamaño final del contenedor. ¿Cual es tu pensamiento al respecto?

  • Emerson, prdón, rectifico lo que dije del anchor.

    Debo estar dormido aún.

    Funciona correctamente, es bárbara.

    Nuevamente perdón.

  • emersonreed says:

    Hi Juan!

    1- I’m using two different classes (horizontal and vertical) to give at design time a better view of how splitter will be at run time.

    2- I’m using two objects with the splitter because it will "separate" two areas. If you want to use more controls, you can use a container and put the controls inside them. This way is more simple and faster than check all objects each time the splitter is "moved" and you can anchor the objects inside container as you want.

    3- I will add a property to know if a panel is "collapsed" instead of check Caption.

    Tks for your suggestions!

Leave a Reply

Your email address will not be published. Required fields are marked *