[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why does the GridView fire the Draw Event continuously ?
[Thread Prev] | [Thread Next]
- Subject: Re: Why does the GridView fire the Draw Event continuously ?
- From: Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
- Date: Tue, 19 Nov 2024 20:11:21 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Le 19/11/2024 à 20:09, Claus Dietrich a écrit :
HiToday I implemented A GridView in one of my apps and found that it caused a CPU load of up to 80%. The App slowed down to an unacceptable level. This mini program with a GridView demonstrates it:Public Sub Form_Open() GridView1.Columns.Count = 1 GridView1.Rows.count = 3 EndPublic Sub GridView1_Draw(X As Integer, Y As Integer, Width As Integer, Height As Integer, Row As Integer, Column As Integer)Print Time GridView1[Row, Column].Text = "Hello" EndIt shows, that the draw event is triggered continuously (here about 2.500 times per second) with a very high CPU load.This issue was already brought up in the recent ML thread "Data event of TableView" a few days ago. I am wondering why this is regarded as "normal". Why does the Gridview fire the draw event continuously? This makes no sense to me. Is this Draw Event different than Draw Events of other controls?Best regards Claus
Unless you do something weird in your code, which I don't see, it should not behave like that, as the Draw event comes directly from the repaint events of the toolkit.
Does it behave the same way with GTK+ and QT? Can you post your project? -- Benoît Minisini.
Why does the GridView fire the Draw Event continuously ? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |