[Gambas-user] ScrollView problems since it was rewritten in Gambas
Benoît Minisini
g4mba5 at gmail.com
Mon Nov 19 23:24:11 CET 2018
Le 19/11/2018 à 22:09, Benoît Minisini a écrit :
> Le 19/11/2018 à 12:56, Fabien Bodard a écrit :
>> The both are logical... In the real life a qt component don't show
>> it's internal... In Gambas yes ... but how to get the widget root ?
>>
>> In my mind if I put something in a container .parent must return the
>> global container ... not it's structure.
>> If I put myObject in a MyContainer ... MyObject.Parent is a
>> MyContainer ... no ?
>>
>> Maybe it need two property to manage this case ... A way to get the
>> class container (MyContainer) and a way to get the true container (panel)
>>
>
> I know that a container is used as the official container of a control
> made in Gambas.
>
> So I can make the Parent property returns the expected container (the
> control made in Gambas) and not the real one.
>
> I will try it, but it may break things : everything that browse the
> control hierarchy from bottom to top.
>
> Or I can make an option in the UserContainer class that makes the Parent
> property return the UserContainer control instead of the inner container
> used by the implementation.
>
> I will try it too.
>
Done in commit
https://gitlab.com/gambas/gambas/commit/44a3f5f664f3aa5c202fd25c51c7d25608cc48e0.
Now Control.Parent ignore the inner containers of controls made in Gambas.
Let's see if something breaks...
--
Benoît Minisini
More information about the User
mailing list