Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

EditBox in front of PopupMenu Item

Posted on 2011-09-15
13
Medium Priority
?
737 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 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