Toggle between a block cursor and a underline cursor does't always work.

Posted on 2007-08-07
Last Modified: 2013-11-05
Dear Experts,

I have made a little programm with a MainMenu on it and my own component with
Align = alClient. When I select Menu-item Alter Cursor (switching between a block-cursor
and an Underlinded cursur) it often doesn't perform the switch immediatelly. Sometimes
I have to press the menu-item twiced to go from underlined to blocked or visa versa.

I have put a little example on my site:
Underneath the Under Construction-bar you see a floppy-disk.


Peter Kiers
Question by:peterkiers
    LVL 26

    Accepted Solution

    Peter, when switching from block cursor back to line cursor, you need to remove the block cursor on the screen (otherwise the canvas is not repainting, and will still show the block).

    You can use Invalidate, or can optionally redraw the rectangle using the back color before drawing the line.

    LVL 1

    Author Comment

    Thanks for the advice...


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
    Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now