[Gambas-user] One control with Expand, one not (Gambas2)

Fabien Bodard gambas.fr at ...626...
Mon Dec 12 13:42:00 CET 2011


2011/12/12 Bruce Bruen <bbruen at ...2308...>:
> On Mon, 2011-12-12 at 12:29 +0100, Rolf-Werner Eilert wrote:
>
>> Hope you can help here.
>>
>> I have a Tab control in my main Form. The Form is divided by an HSplit,
>> the Tab control sits on the right. In one of the tabs, there is a
>> GridView. This GridView shall expand with all the others. All this has
>> been running well, although I did not set the controls'
>> Expand-properties to True. Instead it was enough to set the
>> HSplit-Expand to True, the rest didn't matter.
>>
>> First question: why does it run like this? Why doesn't it need Expand to
>> be set in all controls which shall expand or at least for all containers?
>>
>> Now, for some reason I had the idea to set another container/control
>> pair over the GridView. If I do so, it is automatically expanded. This
>> is a bit tricky now, because this pair should not expand but keep a
>> fixed size. How do I tell not to expand this container or control?
>>
>> Do you understand what I mean?
>>
>> Regards
>>
>> Rolf
>
> I think you need to look at what the various container Arrange
> properties are (or at least tell us).
>
> The Expand property should be read as "can_Expand" rather than
> "will_Expand" and depends on the Arrangement property of it's parent
> container.
> In other words, controls can't "Expand" by themselves. Nor does Expand
> in a container control what happens to its children, it just controls
> whether the
> container itself can Expand.
>
> Also note that the HSplit doesn't have an Arrangement property because
> it is intrinsically set to "Fill". As it wouldn't make sense otherwise.
> hth

in fact ... just put a panel in first container and then fill that
container as you want.

Hsplit not manage containers but object size each object but in split
count is added with a new separator.


Yes expand is for the control in his container ... if it's container
is fixed .... the control is fixed too. The arrange procedure allow a
fine control of the elements ... but need some attention.
Nevertheless it's more simple than define all in _resize event :)


You need to make the control arrangement step by step from the lower
container to the upper.



> Bruce
> ------------------------------------------------------------------------------
> Learn Windows Azure Live!  Tuesday, Dec 13, 2011
> Microsoft is holding a special Learn Windows Azure training event for
> developers. It will provide a great way to learn Windows Azure and what it
> provides. You can attend the event by watching it streamed LIVE online.
> Learn more at http://p.sf.net/sfu/ms-windowsazure
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard




More information about the User mailing list