Delphi/CB
•  Greatis •  Security •  AppDatabase •  Utilities •  Visual Basic • .NET •  just4fun
Delphi / C++ Builder
Components, utilities and tips for Delphi and C++ Builder developers
More info
Image Editor Suite FAQ
Image Editor Suite Home
Delphi Components
See also
Products
Form Designer
Object Inspector
Runtime Fusion
Print Suite
Commented Image
Image Editor  new!
Delphi Toys
Ultimate Pack  hot!

FAQs
Form Designer FAQ
Object Inspector FAQ
Print Suite FAQ

Links
Software for .NET
Software for VB 6
Delphi Tips & Tricks

Services
Outsourcing
How to use TSimpleDrawer?
TSimpleDrawer has no own functionality and just publishes events related to all drawer's methods, so all you need to use TSimpleDrawer is just use some event. Let's look at teh simplest example. On the supposing that we use TStandardDrawer and want to change the standard cursor to our own cursor. It's very simple. Follow these steps.
  1. Drop TSimpleDrawer component onto your form.
  2. Double-click on the Drawers property of TImageEditor, add new item, link it with our TSimpleDrawer and move this item to the top of list.
  3. Select our TSimpleDrawer component and double-click on the OnSetCursor event to auto-create the event handler.
  4. Write some code, like this simplest one:
      Processed:=True;
      Cursor:=crCross;
    
    Set Processed to True to prevent calling SetCursor method of our standard drawers.
  5. If you need something special, like different cursors for different positions, for different tools, etc, just analyze appropriate properties of passed Editor, like this:
      Processed:=True;
      with Editor do
        case Tool of
          someTool1: Cursor:=SomeCursor1;
          someTool2: Cursor:=SomeCursor2;
          someTool3:
            // left half of the image
            if NewMove.X<ImageWidth div 2 then Cursor:=SomeCursor3Left
            else Cursor:=SomeCursor3Right;
        else Cursor:=crDefault;
        end;
    

Greatis Software Greatis | Security | AppDatabase | Utilities | Delphi/CB | Visual Basic | .NET | just4fun

Contacts | Add to Favorites | Recommend to a Friend | Privacy Policy | Copyright © 1998-2008 Greatis Software

eXTReMe Tracker