[Lazarus] Stringgrid ?
Juha Manninen
juha.manninen62 at gmail.com
Sat Nov 17 21:54:55 CET 2012
On Sat, Nov 17, 2012 at 1:33 PM, William Oliveira Ferreira
<bdexterholland at gmail.com> wrote:
> Juha, why not use onDrawCell ? Is there any performance issue?
No performance issue but you will potentially duplicate the grid's
drawing code when doing custom painting with onDrawCell.
OnPrepareCanvas works with default drawing.
It is explained well in the Grids_Reference_Page in Wiki, search for
OnPrepareCanvas.
About finding code examples, I can again recommend the "Find in Files"
dialog (Ctrl-Shift-F) in Lazarus. Search your key word from Lazarus
source dir, including subdirs, and you get results almost for sure.
There are ~ 1.5 million LOC. FPC sources have still much more code.
Lazarus keeps many search result tabs open, it is one of the best
search GUIs in any IDE.
Let's see: Searching for PrepareCanvas gives 39 matches. They are in
Lazarus IDE sources and in 2 example projects.
One more advertisement: On Linux the search in those 1.5 million
source lines takes < 2 seconds when the files are cached by OS (first
search is slow). On Windows it is always much slower, maybe around 15
seconds.
For me it makes a difference because I do such searches often.
Juha
More information about the Lazarus
mailing list