Solved

Popup window

Posted on 2006-10-19
2
263 Views
Last Modified: 2010-04-05
Hi all,

I m working on delphi5. I want to create small popup help window for selected text on my TRichEdit box on my form, just like there is Ctrl <Space> help in delphi for veiwing the syntax of command. The help should be at location just near the selected text. I searched on net for any package available for popup windows but unfortunately cant find the right one. How could i create such popup window ? or if there is any free s/w package available for this on net?

Regards
SJan
0
Comment
Question by:Asmitagoyal
2 Comments
 
LVL 28

Accepted Solution

by:
2266180 earned 250 total points
ID: 17771906
that is not exactly a popuop window. what delphi shows up is actually some listbox. if you want the same, then all you have to do is something like this:

procedure TForm1.RichEdit1KeyUp(Sender: TObject; var Key: Word;
  Shift: TShiftState);
var p:tpoint;
begin
  if (key = VK_SPACE) and (ssCtrl in shift) then
  begin
    RichEdit1.Perform(EM_POSFROMCHAR,integer(@p),richedit1.SelStart);
    listbox1.visible:=true;
    with p do
    begin
      listbox1.left:=RichEdit1.left+X;
      listbox1.top:=RichEdit1.top+y;
    end;
  end;
end;

of course you need to further adapt this code to fit any possible position of the listbox on the screen and to hide the listbox when you don't need it anymore. if you are to position according to selection, then use something like: RichEdit1.Perform(EM_POSFROMCHAR,integer(@p),richedit1.SelStart+richedit1.sellength);
0
 

Author Comment

by:Asmitagoyal
ID: 17833002
Thanks !! it works !!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 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

17 Experts available now in Live!

Get 1:1 Help Now