use of tPopup menu

Posted on 2009-12-29
Last Modified: 2013-11-23
I'm not using TSpeedbutton any more like in related question. Now i work with  TShape. I can create while run time new tshape from menu (related question). I need code with options to add hint to TShape (still while app is running) from popupmenu with same dialog window.
Question by:pr2501
    LVL 19

    Accepted Solution

    something like this?

    procedure TForm1.OnMenuItemClick(Sender: TObject);
    var NewShape: TShape;
     NewShape := TShape.Create(self);
     NewShape.Parent := Self;
     NewShape.Top := 10;
     NewShape.Left := 10;
     NewShape.Hint := 'a hint for the shape';

    Open in new window


    Author Comment

    Yours code works.


    NewShape.Hint := Mname;

    doesn't work.
     I don't have any error messages because Mname is a string variable.
    LVL 19

    Expert Comment

    >  I don't have any error messages because Mname is a string variable.
    that doesn't make sense.

    Show more code please.

    Author Comment

    thank you
    LVL 19

    Expert Comment

    The error is gone?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    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…
    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 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

    13 Experts available now in Live!

    Get 1:1 Help Now