Forum > Other
Wanted: Examples of drawing pixels and lines
(1/1)
kwhitefoot:
Can anyone point me at the right way to create a simple application that draws lines and pixels on a window using Lazarus. I thought I saw mention of a class called TCanvas but it doesn't seem to be in the toolbox.
Marc:
Drop a paintbox on a form and use paintbox.Canvas to draw on
Giuseppe RidinĂ²:
Try this:
http://pascalprogramming.schoolreference.com/
you can find something usefull.
kwhitefoot:
Thanks Marc.
That works nicely. Now all I have to do is figure out how to drive the Lazarus IDE. It works fine until I realize that I need to change the name of a unit or form then all hell breaks loose and the compiler can't find things anymore. :-(
Actually I don't like form painters. I would much rather write code that built the form and have a preview feature that showed me the result without having to compile the whole program first. That way there would be no hidden code.
Marc:
--- Quote from: "kwhitefoot" ---
That works nicely. Now all I have to do is figure out how to drive the Lazarus IDE. It works fine until I realize that I need to change the name of a unit or form then all hell breaks loose and the compiler can't find things anymore. :-(
--- End quote ---
Don't rename files manually, use File -> Save As to rename units.
If you did the latter and it still gets a mess, file a bug.
Navigation
[0] Message Index