[Gambas-user] Feature Request: Reparent function behaviour change.

Benoît Minisini gambas at ...1...
Fri Nov 6 03:17:01 CET 2009


> Beniot - I tough I'd better break this out as it does not relate to the
> original thread.
> 
> Lets say that you have a label name 'label1' and 2 frames named frame1
> and 'frame2'. And you placed 'label1' in 'frame1'. For some reason you
> wish to move in code. So you use the 'reparent' function.
> 
> The pseudo code
> 
> frame1.move(10,10,100,100)
> frame1.move(500,10,100,100)
> 
> label1.X = 10
> label1.Y = 10
> 
> 'the label box is already in 'frame1' so it has relative x y position to
> 'frame1'
> 
> 'now reparent the label
> 
> label1.reparent(frame2)
> 
> Now what happens is that frame2 now moves to X and Y location of the
> label. If you use ...
> 
> label1.reparent(frame2,500,10)
> 
> the frame is in the correct place but 'label1' has now got x=0 and y=0
> 
> I would like to see the following default behavior:
> 	1. New parent retains its properties. I.e stay where it is and does not
> move.
> 	2. The label gets re-parented and all all its values remain the same.
> 	3. The x and y optional values should be for new position for the
> control inside the new parent.
> 
> If you are not sure what I mean take a look at the enclosed example.
> 

Thanks, I see! This is a stupid bug in the gb.gtk component. I will fix it 
before releasing 2.17.1.

Regards,

-- 
Benoît Minisini




More information about the User mailing list