It's a custom code I added to highlight pascal snippets. If you're still having problems let me know what OS you're running and I'll look into it further.įinally, if when pasting pascal code try using the bbcode. The only git commands you need to know are "git clone " to start an initial copy of a git repository, and "git pull" to stay up to date with the latest sources. If you're on Windows I recommend the installing github for Windows application and then just using the "Git Shell" to open a powershell with git command line support. If you are on Linux Debian use "sudo apt-get install git-core" to setup git. I make frequent changes to Cross.Codebot and most of the examples I post require the latest changes. Most of the examples are included in the git repository, but most importantly ALWAYS (I cannot stress this enough) do a "git pull" from the Cross.Codebot folder before you start a new project or attempt to copy and paste code from this forum. Procedure FormMouseWheel(Sender: TObject Shift: TShiftState Ĭan you point me in the right direction? I've had trouble compiling and running the other samples too, because they also start at "var". Procedure FormMouseUp(Sender: TObject Button: TMouseButton Procedure FormMouseMove(Sender: TObject Shift: TShiftState X, Procedure FormMouseDown(Sender: TObject Button: TMouseButton I tried plugging the code you have here into a newly created project, adding Cross Codebot to it, and addingĬlasses, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, I compiled it and got a plain gray form that doesn't do anything - are you doing anything special to setup these projects? S.TextOut(NewFont(Font), Help, R, drWrap) ī := Brushes.ZigZag(clGreen, clTransparent, Zoom, Round(DefBrushSize * Zoom)) Help = 'Pan using the left mouse button, zoom using the mouse wheel' Procedure TForm1.FormPaint(Sender: TObject) WheelDelta: Integer MousePos: TPoint var Handled: Boolean) Procedure TForm1.FormMouseWheel(Sender: TObject Shift: TShiftState Procedure TForm1.FormMouseUp(Sender: TObject Button: TMouseButton Procedure TForm1.FormMouseMove(Sender: TObject Shift: TShiftState X, Procedure TForm1.FormMouseDown(Sender: TObject Button: TMouseButton Notice the pen width and fill pattern scale with the zoom. Use the Translate method to pan, and Scale to zoom.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |