[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: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Tue, 19 Nov 2024 21:24:21 +0000
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
Aah yes, I guess that could be the problem. And note in a GridView_Data event you must use the GridView1.Data.Text property not GridView[Row, Column].Text syntax. Respects BruceS On Tue, 19 Nov 2024, 21:07 Jussi Lahtinen, <jussi.lahtinen@xxxxxxxxx> wrote: > You must use the Data event to fill the grid (also true for other similar > controls). Draw is for drawing. > > Jussi > > On Tue, Nov 19, 2024 at 9:09 PM Claus Dietrich <claus.dietrich@xxxxxxxxxx> > wrote: > >> Hi >> >> Today 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 >> >> End >> >> Public 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" >> >> End >> >> It 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 >> >> >> >> >> >> >> >> >> >> >>
Why does the GridView fire the Draw Event continuously ? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
Re: Why does the GridView fire the Draw Event continuously ? | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |