Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is one of the best findings, at least to me ;)</p> <p>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).</p> <p>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.</p> <p>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 <strong>were</strong> some solutions but they did not fit my needs.</p> <p>Now, before the answer, here are my rules I had to stick to.</p> <ol> <li><p>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).</p></li> <li><p>There no MDI forms in use. Again for cross-platform reasons.</p></li> <li><p>There are no 3rd party plugins or products in use.</p></li> </ol> <p>Now the answer...</p> <pre><code>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; </code></pre> <p>And that's it!</p> <p>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.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload