[Gambas-user] GridView_Column.Expand = True also needs AutoResize = True to work; expected behavior?

T Lee Davidson t.lee.davidson at gmail.com
Mon Feb 4 19:12:42 CET 2019


On 2/4/19 9:24 AM, Fabien Bodard wrote:
> Le dim. 3 févr. 2019 à 18:27, T Lee Davidson
> <t.lee.davidson at gmail.com> a écrit :
>>
>> Gianluigi discovered that for GridView_Column.Expand = True to actually have an effect, AutoResize also needs to be set = True.
>> [https://lists.gambas-basic.org/pipermail/user/2019-February/066369.html]
>>
>> Is this expected behavior, or a bug?
>>
> 
> I my fill I will vote for a bug. Because normally expand do not take
> care about the content size. Then Autoresize give a size corresponding
> to the content plus the padding and border.
> If expand is selected  with  autoresize at true i think the correct
> behavior will be to have a column than have a minimum size and just
> complete the free space if it have.
> 
> am I wrong ?
> 

I'm not sure, Fabien. I don't think GridView.AutoResize takes content width into account.

I was thinking that AutoResize was just a shortcut for GridView.Columns[GridView1.Columns.Max].Expand = True. But, that does not 
appear to be the case. If the first and last columns are set Expand = True, they both expand equally. That is, unless AutoResize 
is set to False, then no columns expand.

If Benoît doesn't weight in on this soon, I'll probably just file a bug report and let him reject it if it is expected behavior. 
Then I can update the Wiki if needed.


___
Lee




More information about the User mailing list