From 7c683a4453a56e2b27a9d9a450e5078cb3d243c8 Mon Sep 17 00:00:00 2001 From: graemeg Date: Wed, 8 Aug 2007 23:56:32 +0000 Subject: * Mouse Cursor support has been added (GDI is untested). * TfpgEdit and TfpgMemo now change the mouse cursor correctly. * The prototypes/fpgui2/tests/edittest project show the mouse cursor in action. A GUI example project will be created soon to show all available cursors. --- prototypes/fpgui2/tests/edittest.dpr | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'prototypes/fpgui2/tests') diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index 2313dd70..6bc1fb51 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -111,9 +111,8 @@ begin InflateRect(r, -1, -1); // Canvas.DrawControlFrame(2, 2, Width-4, Height-4); - writeln('000000'); Canvas.DrawControlFrame(r); - writeln('111111'); + { Canvas.SetColor(clGreen); Canvas.FillRectangle(r); @@ -305,26 +304,11 @@ begin end; procedure TMainForm.btnDisplayBMP(Sender: TObject); -var - bmp: TfpgImage; begin - exit; - bmp := LoadImage_BMP(SetDirSeparators('../../../images/themes/luna/button.bmp')); - bmp.CreateMaskFromSample(0, 0); - bmp.UpdateImage; - - Canvas.BeginDraw; - Canvas.ClearClipRect; - // For some reason, under Windows if I don't call this - // the forms background goes black. - Canvas.Clear(clWindowBackground); - - Canvas.DrawImage(10, 200, bmp); - Canvas.DrawImagePart(10, 240, bmp, 0, 0, 32, 21); - Canvas.DrawImagePart(50, 240, bmp, 32, 0, 32, 21); - - Canvas.EndDraw; - bmp.Free; + if MouseCursor = mcDefault then + MouseCursor := mcHourGlass + else + MouseCursor := mcDefault; end; procedure TMainForm.btn3Click(Sender: TObject); -- cgit v1.2.3-70-g09d2