Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9107849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:40:19+00:00 2026-06-17T02:40:19+00:00

This is only part of a larger project. I have a text box on

  • 0

This is only part of a larger project. I have a text box on a form and when the command button next to it is clicked, I want to bring up a form that looks aligned to the text box. The idea is to make it look like a drop-down box. But the only thing is that this ‘drop-down’ is another form and a modal one.

This is what I’ve done so far and the form shows fine.

procedure TfrmSetupTaxes.cmdChangeParentClick(Sender: TObject);
var
  Res : Integer;
  frmPopUp : TForm;

begin
  frmPopUp := TfrmTreePopUp.Create(nil);

  frmPopUp.Parent := Self;
  frmPopUp.Top:= self.rp.Top + self.EditItemCat.Top +
                 self.txtSelParentName.Top + self.txtSelParentName.Height + 3;
  frmPopUp.Left:= self.rp.Left + self.EditItemCat.left + self.txtSelParentName.Left;

  Res := frmPopUp.ShowModal;
end;   

Note: ‘rp’ is a panel and ‘EditITemCat’ is a tabsheet. These are merely used for positioning.

Now, here’s my problem…

Although the form shows up, it seems frozen. It does not respond, neither does the parent form. Since I’m on the IDE, I just close it.

Can someone please show me what I’m missing here?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:40:21+00:00Added an answer on June 17, 2026 at 2:40 am

    This is one of the best findings, at least to me 😉

    After a lot of digging and direction, I realised that it was beyond me. I could not figure out the ‘right’ way that would work for the various OSs (at least Windows and Ubuntu).

    Finally I hired an expert (no, not from any forum site) and paid him to show me this. And with the hope that it may help other developers, I thought it would be best to post it here.

    Before the answer, I need to give a big thank you to Sertac-Akyuz who showed me that certain things were impossible. I also found through their links that there were some solutions but they did not fit my needs.

    Now, before the answer, here are my rules I had to stick to.

    1. I should not use Any Windows-specific functions or APIs because I want to be able to port my work between Windows and Ubuntu (at least for now).

    2. There no MDI forms in use. Again for cross-platform reasons.

    3. There are no 3rd party plugins or products in use.

    Now the answer…

    procedure TfrmSetupTaxes.cmdChangeParentClick(Sender: TObject);
    var
      Res : Integer;
      frmPopUp : TForm;
      pt: TPoint;
    begin
    
      frmPopUp := TfrmTreePopUp.Create(self);
    
      pt := txtSelParentName.ClientToScreen(Point(0, 0));
    
      frmPopUp.Top := pt.y + txtSelParentName.Height;
      frmPopUp.Left := pt.x;
    
      Res := frmPopUp.ShowModal;
    
    end;
    

    And that’s it!

    The key was in NOT setting the parent property of the popup. Then using ClientToScreen (a function I didn’t even dream of using). It does the job beautifully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code to run a slideshow (this is only part of what
I am not sure whether this only happens to me. Basically if I have
I have a large project built in as3. Part of its main functionality is
I have a web application solution existing under Visual Studio 2010. Part of this
As part of a larger project I'm trying to implement a facility using JOGL
I am part of the development of a larger-scale Silverlight 4 project, where we
This only happens in some IE's. Here: http://animactions.ca/Animactions/volet_entreprise.php You may notice that when you
This only happens in IE. I'm using swfobject and loading the flash vars as
why does this only alert 1 ? function test() { var myobj = {
My url generates like this: only shows in ie9 http://myurl.com/#/categories/posts how do I remove

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.