[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why does the GridView fire the Draw Event continuously ?
[Thread Prev] | [Thread Next]
- Subject: Why does the GridView fire the Draw Event continuously ?
- From: Claus Dietrich <claus.dietrich@xxxxxxxxxx>
- Date: Tue, 19 Nov 2024 20:09:10 +0100
- To: Gambas MailingList <user@xxxxxxxxxxxxxxxxxxxxxx>
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
Re: Why does the GridView fire the Draw Event continuously ? | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |
Re: Why does the GridView fire the Draw Event continuously ? | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Why does the GridView fire the Draw Event continuously ? | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |