?
Solved

EditBox in front of PopupMenu Item

Posted on 2011-09-15
13
Medium Priority
?
735 Views
Last Modified: 2013-11-23
Is it possible to place EditBox in front of PopupMenu Item on rightclick immitating editable item?
If so, please give sample.
Application doesn't have visible form, menu popups on click on tray icon.
Delphi 7.
Thanks.
0
Comment
Question by:3axap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
13 Comments
 
LVL 19

Expert Comment

by:Thommy
ID: 36547438
You can try this...

Is it possible to implement TEdit into popup menu?
http://www.tek-tips.com/viewthread.cfm?qid=1301866
0
 
LVL 19

Expert Comment

by:Thommy
ID: 36547465
I think there's no chance modifying standard Delphi PopupMenu, because it's just an encapsulation of a standard Windows control.

What you can do is to create your own popup.
Create just a simple form with your desired elements which is activated on right-click and looks like/behaves like a normal popup menu...
0
 

Author Comment

by:3axap
ID: 36547515
Does it need to be be modified? It just need to stay open when rightclicked on item and that's doable. I think I need to get coordinates of selected item and place EditBox there. I did search for solution before asking here and played with toolbar2000 too. I'd like to use plain Delphi components.
I found this tip how to obtain coordinates http://www.delphidabbler.com/tips/117 But I'm not experienced enough to implement it.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Thommy
ID: 36547562
If you want to place an TEdit over the menu item then you will have to modify the popup.

If you place you TEdit in its own form and activate this form on right-click on the popup menu item, then you can show this Edit form on the position of the menu item.
Is that the solution you want???

0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 36547590
just add a menu item to the popup menu.
"Enter value".  When clicked this displays a form with a TEdit for you to enter a value
> Have you thought about a cancel and ok button in the TEdit of the menu too ?

Why make it so difficult ?
0
 
LVL 38

Expert Comment

by:Geert Gruwez
ID: 36547592
oops, same idea Thommy, i didn't refresh
0
 

Author Comment

by:3axap
ID: 36547655
If you place you TEdit in its own form and activate this form on right-click on the popup menu item, then you can show this Edit form on the position of the menu item.
Is that the solution you want???
That's what I'd like to get.

Click outside EditBox or press Enter key will save changes and Esc cancel them.
0
 

Author Comment

by:3axap
ID: 36549282
sample code anyone?
0
 
LVL 19

Expert Comment

by:Thommy
ID: 36559130
This is an example of how to implement OnRightClick event for a Delphi TPopUpMenu

Unit RCPopUpMenu is from http://www.delphipages.com/forum/archive/index.php/t-180337.html

Also have a look at see http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_20308176.html

PopupMenuTest.zip
0
 
LVL 19

Accepted Solution

by:
Thommy earned 2000 total points
ID: 36559157
The problem still is, that a popupmenu is automatically closed even after right-click!!!

It's not quite easy to change this standard behaviour...

How can I make a menu stay visible after it's clicked?
http://stackoverflow.com/questions/2766072/how-can-i-make-a-menu-stay-visible-after-its-clicked

How to Detect a TPopupMenu's OnClose (OnPopDown) Event
http://delphi.about.com/od/adptips2006/qt/popuplistex.htm
0
 

Author Closing Comment

by:3axap
ID: 36559235
Thank you Thommy.


Looks like it's much easier to mimic PopupMenu with own Form.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

770 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