[Gambas-user] Paint misbehaves on QT when a ValueBox.value is changed (v3.5.4)

Benoît Minisini gambas at ...1...
Sun Oct 19 00:29:07 CEST 2014


Le 19/10/2014 00:11, T Lee Davidson a écrit :
> On 10/18/2014 04:06 PM, Benoît Minisini wrote:
>>> Well that's a little disappointing that you weren't able to replicate
>>>> the issue on your system. On mine, the red line is drawn and then when
>>>> it comes time for the blue line to be drawn, the red line disappears as
>>>> if the DrawingArea has been cleared. It's a mystery to me.
>>>>
>>>> But, thank you for looking into it.
>>>>
>>>> Lee
>>>>
>> Did the 3.6 version fix your probelm or not?
>>
>> -- Benoît Minisini
>
> I was curious about that too, Benoît. And, it was the first thing I
> tested after getting 3.6 installed. I didn't report my findings, because
> I had no idea that you would have remembered. But you did! :-)
>
> Did 3.6 fix the problem?
>
> Partially. DrawingArea.Clear now works with both QT4 and GTK(2).
>
> But I still need to call DrawingArea.Show to get the drawing to display
> properly after any modification of a TextBox or ValueBox control's Value
> property. (Note: DrawingArea.Cache = True)
>
> Just FYI: If I wrap each line draw in a Paint.Begin/End structure, the
> first line will be displayed until the second line's Paint.End is
> called. As so in pseudo-code:
> Paint.Begin
>     Draw red line
> Paint.End
> Modify ValueBox.Value
> Paint.Begin
>     Draw blue line
> Paint.End 'The red line disappears here and blue line is not displayed
>
> If I do not wrap each line in its own block as in:
> Paint.Begin
>     Draw red line
>     Modify ValueBox.Value
>     Draw blue line
> Paint.End
>
> then nothing is displayed unless I call DrawingArea.Show after Painting.
>
> I can provide a project if you wish, but I think calling
> DrawingArea.Show is a very workable solution.
>
> And, thank you for remembering.
>
>

Yes, I need your project to test again. And remind me which version of 
GTK+ exactly you use.

Regards,

-- 
Benoît Minisini




More information about the User mailing list