Calculating the placement of VCL components on Form

Good Day,

I am attempting to place components (VCL) on a form in a manner where the appearance of the form is important.  I have set the form size at 880 x 1200 (height and width), then place two edit boxes so that the one on the left side of the screen begins 16 pixels from the left edge and the one on the right side ends 16 pixels from the right edge.  Each edit box is 250 pixels wide (at least I think all of the size integers in the Object Inspector are in pixels).  So the left most edit box has a left value of 
16.  However, when I set the right most edit box at (1200 - 16 -250) or 934, it does not appear in the proper place on the displayed screen when the program executes.

I am also using the Elasticform VCL which resizes the form to the screen height and width.  I really hope that this problem is not caused by Elasticform, as I do not know of any reasonable replacement for it.  If you believe that Elasticform is causing the problem, what settings should I change on it?

What am I doing wrong?

Any advice will be greatly appreciated.  Thank you John Shyer
0
John
8/5/2015 7:36:40 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

3 Replies
366 Views

Similar Articles

[PageSpeed] 6

John wrote:

> at least I think all of the size integers in the Object Inspector are in 
pixels

Yes, they are.

> However, when I set the right most edit box at (1200 - 16 -250) or 934,
> it does not appear in the proper place on the displayed screen when the
> program executes.

Where exactly does it appear?

> I am also using the Elasticform VCL which resizes the form to the screen
> height and width.  I really hope that this problem is not caused by
> Elasticform, as I do not know of any reasonable replacement for it.

Did you configure the right-side TEdit to reposition itself whenever the 
Form resizes?  Are you using Anchors for that?  The default Anchors is [akLeft,akTop]. 
 If you need the right-side TEdit to always be 16 pixels from the right edge 
of the Form, you have to position the Edit where needed (Left=934) and then 
set its Anchors to [akRight,akTop] instead to maintain that relative position 
as the Form's Width changes.

-- 
Remy Lebeau (TeamB)
0
Remy
8/5/2015 8:10:49 PM
John


If its ElasticForm (and I agree I have yet to find a replacement) try disabling resolution independence. Its also possible that the sequence of events means that the form is resized and then you try and position the edit boxes using the old form sizes. If you're using actual numbers rather than properties (Form.Width & Edit2.Width) that can screw up nicely.

Roy Lambert
0
Roy
8/7/2015 3:38:00 PM
One thing I have found quite handy is to use ClientWidth and ClientHeight instead of the Width and Height properties of the form.  That helps prevent issues of border width and similar messing with your math.
0
Carl
8/10/2015 8:10:52 PM
Reply:

Similar Artilces:

ANN: Bricksoft IM VCL Component v8.2 released. All components support Delphi 2009!
All components support Delphi 2009! Please download the trial version(http://www.imcomponents.com/bsimtrial.zip) if you like. -- Bricksoft Support Bricksoft IM(MSN+YAHOO+AIM+ICQ+Jabber/GTalk) SDK For NET/VCL/COM/SOAP - http://www.imcomponents.com/ "Jianmin Wu" <nospam@nospam.com> wrote in message news:72535@forums.codegear.com... > All components support Delphi 2009! with D2009 support, do you still require TNT controls for unicode ? Also do you have any plans to support emoticons ? Regards, Danny Component and demo for D2009 don't need TNT cont...

Firemonkey components on VCL Form
Hello Everyone, I am new to Firemonkey Framework and I have been playing with it for a few days, and I have a question. Is it possible to use Firemonkey components in VCL forms or vice versa ? Thank you. Shahriar wrote: > Is it possible to use Firemonkey components in VCL forms or vice versa? Mixing VCL and FireMonkey together in the same app is not officially supported, but it is technically doable with a little effort. There have been several blogs posted online that explain how to do it, search around. -- Remy Lebeau (TeamB) ...

How to uninstall a VCL Component in Delphi 2007?
Guys How do I uninstall a VCL Component in Delphi 2007? Mark Moss Nevermind I figured out how to do it. Mark Moss "Mark Moss" <markemoss@comcast.net> wrote in message news:245205@forums.embarcadero.com... > Guys > > > How do I uninstall a VCL Component in Delphi 2007? > > > Mark Moss ...

Which VCL components are (not) included in Delphi XE5 starter?
I currently own RAD Studio 2010 Professional with which I have developed a few Delphi applications, mainly for personal use. I only develop for Windows 32-bit platform and do NOT use Database components, I consider switching from Delphi 2010 Professional to Delphi XE5 Starter Edition and would like to know if my current applications can be compiled with Delphi XE5 Starter. Is there a way to check this _before_ buying Delphi XE5 ? My main concern is that some VCL components from Delphi 2010 Professional are not included in Delphi XE5 Starter Edition, but I cannot find a list which components...

Delphi VCL components properties history articles
Hi, i would like to know where i can found Delphi VCL components properties history information because i need to know from wich Delphi version a property exists or from wich version a protected procedure was marcked with "virtual" command from a standard component. Thanks, Maurício "Julio Pião" <=?Utf-8?Q?Julio_Pi=C3=A3o?=> wrote in message news:292952@forums.embarcadero.com... > i would like to know where i can found Delphi VCL components > properties history information AFAIK, that kind of list does not exist anywhere. > i ...

.net component to Delphi component ?
Hello, Is there a way to use .net component inside Delphi ? Thanks On Tue, 18 Nov 2008 13:16:37 -0800, isaac sam wrote: > Is there a way to use .net component inside Delphi ? http://www.managed-vcl.com/ has some libraries for this. -- Marc Rohloff [TeamB] marc -at- marc rohloff -dot- com Marc Rohloff wrote: > On Tue, 18 Nov 2008 13:16:37 -0800, isaac sam wrote: > >> Is there a way to use .net component inside Delphi ? > > http://www.managed-vcl.com/ has some libraries for this. > I was hoping for a free tool but thanks On Tue, 18 Nov 2008...

Transfering VCL Form App from Delphi to Builder
Hey all. Is there any way I can transfer my VCL forms application from Delphi to C++ Builder? I don't need to transfer the functionality, I'm recoding everything but I just need to copy the layout. So I thought maybe theres a way I can duplicate or export/import the form layout to C++ Builder? It's an mp3 player I was working on last year in Delphi code, and I'm recoding it in C++ but I'm still going to use the same layout. And it's a simple layout, just a couple of listboxes, buttons, scrollbars etc. Any ideas? In article <113629@forums.codegear.com>, And...

MAC OS-style VCL components for Delphi?
Hi all, I saw an application that I am interested in porting from C to Delphi (http://thirdcog.eu/apps/cfxr) and found it comes with a win32 version, using IMHO yucky controls, and a nice shiny native MAC version (Coca, etc). I really like the look, of the Mac port...I was wondering if there are any VCL controls (preferably free) that can make nice buttons, sliders, etc. like in that MAC screenshot? I'm not worried if they don't operate exactly like MAC ones, I mainly like the look :) I have tried googling but no luck so far :( cheers, Paul www.alphaskins...

Spreadsheet component for use in Delphi VCL 2010
Good day I have been using the Flexcel component for reading and writing Excel spreadsheets in my Delphi VCL projects for some while and have been very happy. Unfortunately, though, a version for use with Excel 2007 format files (.XLSX) has been promised for years now but just never arrives and I have reached a stage where I just have to update some of my software. Can any body suggest alternatives and comment on their experience with these? I have no objection to buying a component although all my programs are for academic use by myself and colleagues/friends so cheaper would...

Component to host VCL component
In the old days, when FireMonkey was still VGScene, we had a nice component that would host any good old VCL component. Very practical. How is this achieved with FireMonkey? I'm not interested in any cross-platform stuff, just want to use it on Windows. ...

skin component for VCL.NET Delphi 2007 ?
I'm trying to find out a component which skin forms automatically. It needs to be VCL.Net component for Delphi 2007. I tried to find one on the web with no success. There are many for VCL but not for VCL.Net. Thanks, Rumen ...

Forms and vcl.forms unit
In XE2, I'm adding a form to an application that is several versions old. The old version had Use Forms, not vcl.forms. XE2 adds vcl.forms to the new form, of course. I tried to use forms.screen... as I used to. The compiler said that I needed to have Forms (and added it in the implementation section). Then it would not compile, saying that vcl.forms was redeclared. To get it to work, I had to change vcl.forms to Forms and omit the other Use Forms. Is this a bug of some sort? (It doesn't seem to realize that vcl.forms takes the place of forms, or something.) Ju...

Delphi component for computing general linear mixed models ??
Are there any statistical software available for Delphi for computing General linear mixed models so that having a data sampler and analyser also may run statistics directly on group of humans observed pr minute basis that should be compared together ?? For you old-timers here is a hint as to what the subject is about: http://www.google.com/search?hl=en&q=%22General+linear+mixed+models%22 --JohnH Have you looked at http://www.dewresearch.com/ which has some useful code for that sort of thing? /Matthew Jones/ Alf Christophersen wrote: > Are there any statistical softw...

How to add COM component in Delphi Prism design form?
In MS Visual Studio Shell 2010 (Delphi Prism IDE), i want to use a vector graphic tool either VeCAD or LiteCAD. But both of them are OCX / DLL files. They are shown in toolbox (choose item option), as COM component, not as .Net Framework component. How to use COM component into Delphi Prism? these component also shown in toolbox items. But i can't drag them on design form. it gives error "Failed to create component AxHost. System.Reflection.TargetInvocationException: COM target doest not implement IDispatch" What is the reason behind it? How to solve this prob...

Web resources about - Calculating the placement of VCL components on Form - embarcadero.delphi.general

Algorithms for calculating variance - Wikipedia
Algorithms for calculating variance play a major role in statistical computing. A key problem in the design of good algorithms for this problem ...

Facebook Tweaks Formula for Calculating Active Application Users
Facebook made a change to the way that it counts active users for applications starting last Friday. Now, likes and comments on stream content ...

Converter - Matrix Calculating on the App Store on iTunes
Get Converter - Matrix Calculating on the App Store. See screenshots and ratings, and read customer reviews.

Calculating Taxes Up And Down - Flickr - Photo Sharing!
I created this shot in my studio for use on my site, SeniorLiving.Org but I want to share it since it is applicable to much more than just senior ...

How To Channel Your Road Rage Into Cold, Calculating Road Revenge - YouTube
Subscribe to The Onion on YouTube: http://bit.ly/xzrBUA Defensive driving instructor Danny Preston says the best way to avoid conflict on the ...

Is there a magic formula for calculating super?
... the many calculators out there are giving us an accurate picture of our retirement needs? Q. Could you please tell me the formula for calculating ...

All that glitters is not gold: Calculating the small business tax break
Working out how much you can claim under the government's instant asset write off can be a complicated process.

Treasury deny any part in calculating Coalition's $10b savings hole
Australia's two most senior economic bureaucrats have effectively torpedoed Kevin Rudd's claim of a $10 billion hole in opposition costings declaring ...

Quebec Calculating Subsidized Daycare Spots It Can Offer Syrian Refugees 8
All of Quebec's so-called institutional childcare centres are full.

Calculating a percentage in a Google spreadsheet
In the second of our continuing series of video tutorials on using data journalism tools, Fred Vallance-Jones shows you how to calculate percentages ...

Resources last updated: 2/7/2016 7:44:23 PM