Solved

Popup window

Posted on 2006-10-19
2
266 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
[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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Twebbrowser add css to the header 3 39
Delphi TListView and TEdit (Select item and input into TEdit) 10 51
Firemonkey Queue list 1 32
Broadcast a message using ICS 2 28
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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