Delphi XE7 IDE moves/resizes controls slightly when form is opened - forms

On opening a standard VCL form from our application, several controls are moved or resized slightly. e.g. a few pixels shorter or a few pixels to the left. Saving the form obviously commits these changes. Anyone know what causes this and how I can stop it?
Our application was developed in Delphi 7 and I think this issue has started since we recently moved it to XE7. Having made various code changes to various forms we've started noticing that controls had moved/sized a bit and thought they were mistakes. But today I've noticed that it happens when the form is opened. The form was previously saved in XE7 (it's not just the first open of a D7 form).
The controls seem to be mostly losing a couple of pixels off the Height, Width or Left property. I've not seen any of these values increasing, only decreasing. Not all controls on the form, just a few. The problem isn't limited to a single form. The Form.Scaled property is false.
Is something getting rounded/recalculated? There are 2 developers working on the application - could a problem be caused by developing on different resolutions or something?
Thanks a lot for any ideas =)
EDIT! Viewing a diff of the changes that were applied, I think poss all of the controls adjusted have non-default anchor settings. e.g. a button moved 2 pixels left is anchored [akTop, akRight]. It's on a panel that is anchored [akLeft, akTop]. Another control that lost 2 pixels from Width and Height is anchored [akLeft, akTop, akRight, akBottom]. I have just reverted the changes, changed the anchoring by editing the dfm and opened the form again: The control that moved previously didn't move. I'm certain it is related to anchoring.
EDIT2! Easy to repeat! It is related to the anchor of the control and the BorderStyle of it's parent control (TPanel). Add a form with a TPanel and add a TLabel within the panel. Set the TLabel to anchor [akTop, akRight]. Set the TPanel to have no bevel, CTRL3d=False, BorderStyle=bsSingle and BorderWidth=1. Note the Left property of the TLabel. Save the form. Open it again. Look at the TLabel's Left property. It has moved 2 pixels left. Keep on opening, saving and closing the form and watch the label move from right to left. Here's a pic of my example form

Related

MS Access form not centering properly across different monitors

I have an MS Access form where I have the main navigation page set to be centered and it works... kinda.
This form file has to be used on monitors of many different aspect ratios: 3:4, 16:9, and 21:9. When the form opens, it is properly centered in whatever window it opens. But when that window is then maximized, it doesn't re-center and instead sticks to the left side of the screen. Sometimes if I move it between monitors, the form is far 'off screen' in its own window and I have to scroll in the form to bring it into view, then it's stuck on the right hand side of the form.
Is there a way to force the form to re-evaluate what "centered" means?
It depends on how you are centering. The easiest way for objects to be dynamic is to use the form layout tool called "Anchoring". I like to make my layout expand to fill up the window to allow centered objects to remain centered as the window changes.

Create a 'Group Box' in Word Userform

"Group Box", for lack of a better word: I want areas in my user form which are visually different from others, with a different background colour and a frame around them, such as is possible to create using Frame controls. However, I want none of the events of Frame controls and none of their interaction with other controls in the form.
More particular, I want to be able to tab through all text, list, combo and check boxes, regardless of their location in 'Group Boxes', in fact also regardless of the possible location of their 'Group Box' within another 'Group Box'. Most of my controls have On Enter, On Exit, On Change and On Key even procedures attached to them which may re-direct the focus to any control on the form. Doing so under the constant interference of Frame controls with their events and rules - many of them not working correctly, none of them properly explained anywhere - is a gargantuan task. The easy way would be to have the visual design capabilities only, without the "intelligence" which assumes control in a way not compatible with my own plans.
Perhaps the one feature of frames which makes them unfit for my purposes is that they act as forms within the form, meaning they appoint an ActiveControl when activated which they refuse to release when another control takes the focus outside their own frame. It is inconvenient to prevent a first control's On Enter procedure from running when any control in a frame receives the focus (different for first and subsequent times), but it's a much bigger task to deal with the selected control's On Exit event which won't fire until the form is closed, meaning it is missed when the control optically loses the focus and a nuisance when it technically does.
Is there a control that fits my needs in MS Word? Or can the Frame control be stripped of its events in some way? Could I place a Text Box, for example, in front of a Frame control without it also being "within" it?
For MS Word use a label with a background color.
For MS Access use the rectangle Object behind the controls.
First make the form background a grey color. Then add subforms(ms access) and rectangles to segment the controls.
The end effect is it looking like a paneled interface.
You can use a Frame control. Place the other controls first, then place the Frame control, and move it to the back. This should look visually identical to having the controls in the Frame.

Vbulletin - Adding a padded box around elements

I'm attempting to add a box (for design purposes) around the threadlist but for whatever reason, it seems to be closing early and I cant for the life of me figure out whats causing it.
http://fantasy-bomb.com/forumdisplay.php?2-Fantasy-Football-Talk
(The theme to use is "Testing")
Its very ugly atm, notice the black rectangle that slightly hides behind the "title/threadstarter" text... It should be covering the entire threadlist and viewing it in firebug shows everything closed properply. I'm at a loss for why its happening.

ie8 bookmark # click moves page

I have a few basic controls that are anchors with no urls, such as
<a id="UP" href="#">UP</a>
there's jQuery stuff attaching it to the click event (it's a jcarousel control with overflow hidden)
I understand that onclick needs a return false on it to stop scrolling to "#" on the page to that anchor. The issue is that on fresh load, no scrolling and the UP click all in view, the page still moves. Worse, it appears # has 3 or 4 different places! As I click UP repeatedly, the page moves up and down a few pixels as i click and click. This is always different than the absolute top where the page originally rendered.
Is it the overflow of the list that is no longer visibile due to the clipping causing this? Would adjusting heights of the elements so that the list items clip out evenly provide a stop to this? or is there some other ie8 flaw i'm not aware of?
Thanks!
After a bit of trail and error, I figured out that I needed to 'return false' the click handler so that it stopped the chain of events from continuing (ie, following the hash).
Further, I adjusted heights on the wrappers and clippers so that they were even, as that was the kicker on the 3 or 4 differnt height moves

How to build a USAToday type app? Horizontal and Vertical scroll control

I am trying to build an app similar to USAToday i.e. each "article" is a mix of images and text that the user scrolls vertically to read if it covers more than than the size of the screen. Scrolling horizontally brings up the next article and so on.
Each article should have "paging enabled" so that the content moves as if you are turning a page in a book whether you are moving vertically or horizontally.
I must have looked at every tutorial for Scroll and Page navigation, but I am drawing a blank. Any help is much appreciated.
BTW: I have down loaded this tutorial....
http://www.edumobile.org/iphone/iphone-programming-tutorials/pagecontrol-example-in-iphone/
... but (a) it builds ok but simulator only shows a featureless black screen, and I cannot work out how to correct it, and (b) it only scrolls horizontally.
The sample code that you reference is old so I think something has changed in the SDK since then. I was able to at least get the code to run by changing the MainWindow.xib file. I opened that file in Interface Builder and then selected the Window and then in the Window Attributes Inspector I ticked "Visible at Launch". Then the tutorial would at least run and show the colors. I think you might find that there are more issues with it though.
When you are wanting to page something, the real trick is setting the content size of the scroll view.
This StackOverflow question has some good information that might help you get going.