Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-02

TreeView does not draw tiself

10 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Damien Gerard

Hi !

Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem.

http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg

There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know).

Do someone has a clue where the bug comes from ?

PS: This widgetset is GTK2 and you can see issues using TImage, which does not appear under GTK2/Linux.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Damien Gerard
to Damien Gerard

Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit :

Show quoted text 14 lines
Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem. http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know). Do someone has a clue where the bug comes from ?

I forgot :
- Windows: FPC 2.2.1 (Snapshot)
- Linux: FPC 2.2.0

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Damien Gerard
to Damien Gerard: Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can…

Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit :

Show quoted text 10 lines
Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem. http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg

The link was broken and has been renammed :
http://ftn.shikami.org/misc/Lazarus/CSnapshot%202008-02-26%2008-34-32.jpg

There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know). Do someone has a clue where the bug comes from ?
Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Damien Gerard
to Damien Gerard: Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can…

Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit :

Show quoted text 14 lines
Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem. http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know). Do someone has a clue where the bug comes from ?

Under GTK2/Linux, a working revision for me is 14190 but the 14201 does not work.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Damien Gerard
to Damien Gerard: Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can…

Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit :

Show quoted text 15 lines
Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem. http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know). Do someone has a clue where the bug comes from ?

If it can help, the true result would be (r14190) : http://ftn.shikami.org/misc/Lazarus/Snapshot%202008-02-26%2009-28-28.jpg

PS : There is no error with the align property with the previous screenshot. The property has been changed from alNone to alClient.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Mattias Gaertner
to Damien Gerard: Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can…
Show quoted text 7 lines
Hi ! Since a few revision, I have a TTreeView which does not redraw itself. As you can see in the screenshot, it is not for all TreeView components. The left one works correctly but the one in the middle never works. However you can still click on it, no problem.

Please create a bug report and provide an example.

Please avoid special characters.

There is the same behavior with Win32/GTK2 under Windows and Linux (OS X I don't know). Do someone has a clue where the bug comes from ?

I removed some wrong invalidates. Maybe there is one missing at a right place, but the bug never appeared because of the many wrong ones. But so far it works in all my tests.

PS: This widgetset is GTK2 and you can see issues using TImage, which does not appear under GTK2/Linux.

Mattias

Reply by email

Mattias Gaertner
to Damien Gerard: Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit : The link was broken and has been…
Show quoted text 22 lines
Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit : > > Hi ! > > Since a few revision, I have a TTreeView which does not redraw > itself. As you can see in the screenshot, it is not for all TreeView > components. The left one works correctly but the one in the middle > never works. However you can still click on it, no problem. > > http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg > The link was broken and has been renammed : http://ftn.shikami.org/misc/Lazarus/CSnapshot%202008-02-26%2008-34-32.jpg > There is the same behavior with Win32/GTK2 under Windows and Linux > (OS X I don't know). > > Do someone has a clue where the bug comes from ?

... and check that your TreeView.BeginUpdate/EndUpdate are balanced. For example: If you move another window above the TreeView and it does not paint, then you probably forgot an EndUpdate.

Mattias

Reply by email

Damien Gerard
to Mattias Gaertner: On Tue, 26 Feb 2008 08:43:18 +0100 Please create a bug report and provide an example.…

Le Feb 26, 2008 ? 10:12 AM, Mattias Gaertner a ?crit :

Show quoted text 12 lines
On Tue, 26 Feb 2008 08:43:18 +0100 Damien Gerard wrote: > > Hi ! > > Since a few revision, I have a TTreeView which does not redraw > itself. As you can see in the screenshot, it is not for all TreeView > components. The left one works correctly but the one in the middle > never works. However you can still click on it, no problem. Please create a bug report and provide an example.

That's my problem in fact. I can not reproduce the bug. I will check the BeginUpdate and EndUpdate that I use.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email

Damien Gerard
to Mattias Gaertner: On Tue, 26 Feb 2008 09:21:44 +0100 ... and check that your TreeView.BeginUpdate/EndUpdate…

Le Feb 26, 2008 ? 10:17 AM, Mattias Gaertner a ?crit :

Show quoted text 31 lines
On Tue, 26 Feb 2008 09:21:44 +0100 Damien Gerard wrote: > > Le Feb 26, 2008 ? 8:43 AM, Damien Gerard a ?crit : > >> >> Hi ! >> >> Since a few revision, I have a TTreeView which does not redraw >> itself. As you can see in the screenshot, it is not for all TreeView >> components. The left one works correctly but the one in the middle >> never works. However you can still click on it, no problem. >> >> http://ftn.shikami.org/misc/Lazarus/Clich?%202008-02-26%2008-34-32.jpg >> > > The link was broken and has been renammed : > http://ftn.shikami.org/misc/Lazarus/CSnapshot%202008-02-26%2008-34-32.jpg > > >> There is the same behavior with Win32/GTK2 under Windows and Linux >> (OS X I don't know). >> >> Do someone has a clue where the bug comes from ? ... and check that your TreeView.BeginUpdate/EndUpdate are balanced. For example: If you move another window above the TreeView and it does not paint, then you probably forgot an EndUpdate.

Mattias, you are my hero ! :)

Indeed a 'EndUpdate' was missing.

Damien Gerard Le temps n'a pas d'importance. Seul le code est important -- (f00ty)

Reply by email