Mike Sue-Ping
Cambridge, Ontario, Canada
Versions des environnements
>>I have a container on a form. In the container I've dropped several controls. When I size the container such that it becomes narrow and cuts off the controls within, I notice that the container's border is always BEHIND the controls within.
>>
>>I expected that the container's border would have been in front or on top of the controls. After all it is the parent container!
>>
>>Anyone know if this is a "bug" and if so, is there a workaround/fix?
>>
>>TIA
>>Mike
>
>You can call this a "bug" or a "feature". The container border is actually inside the container, and at the bottom of the zorder.
>
>A simple workaround, add another container to the form, 2 pixels taller and wider than your container, set top and left 1 pixel less, set BackStyle to your container backstyle, send it behind your container. that will give you a working border. You can do all this in the Init method of your container.
>
>For a working example of creating the "border container" on the fly in code, download ctl32_scontainer, see the ctl32_create method of the class.
>
>Or just go ahead and use the ct32_scontainer scrollable container class.
>
>Carlos
Hi Carlos,
Thanks for the reply. And a big thank you for your ct32 controls too.
While we're on the subject of the ct32_scontainer scrollable container, do you know of any issues when using it inside of another container, i.e. your scrollable container class is not placed directly on the form. I've put it into a another container in a page of a pageframe. The scrollable container contains a picture control. The scrollable container is anchored such that it grows in height and width when the form/pageframe is resized. What I'm observing is that the picture control and it's parent, the scrollable container, do not grow together but independently. Eventually, the picture control looks to appear totally outside the scrollable container. Not only that, but, the picture control takes on the scrollbars!
I hope that I've explained myself clearly enough for you to understand the problem :)
Mike
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement