Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
TForm ShowModal at a specified position on the screen |
Thu, Feb 8 2018 10:25 PM | Permanent Link |
Paul Coshott | Hi All,
I have a label that can be clicked to add a job to the day schedule (this dynamically adds a new TBasicPanel to a parent TBasicPanel). I will be displaying a form using ShowModal. I'd like to position it based on the position of the label, so it looks a bit like a drop down to the label. What do I need, position wise, to be able to position the search screen in relation to the label that was clicked? I want it to look a bit like a drop down. Cheers, Paul |
Fri, Feb 9 2018 4:24 AM | Permanent Link |
Matthew Jones | Paul Coshott wrote:
> I will be displaying a form using ShowModal. I'd like to position it based on the position of the label, so it looks a bit like a drop down to the label. > > What do I need, position wise, to be able to position the search screen in relation to the label that was clicked? I want it to look a bit like a drop down. There is no problem with doing this, other than determining the left/top location. Depending on your code, that might just be taking the .left of the label, or it might be more depth needed. I have a routine to get the screen position: function LocalToScreenTop(xControl : TControl) : Integer; begin Result := xControl.Top; while assigned(xControl.Parent) do begin xControl := xControl.Parent; Result := Result + xControl.Top; end; end; Obviously you also have to make sure the form's layout is not going to get in the way too. -- Matthew Jones |
This web page was last updated on Thursday, March 28, 2024 at 06:18 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |