472,365 Members | 1,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,365 software developers and data experts.

Adjust Control Height/Width Precisely

Hi,

I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).

These objects are all on different pages of a tab control. As far as
I know that means I can't select them all and use 'Align Left', 'Size
to Widest' etc., which is what I'd do with normal controls on a form.

I've turned off 'Snap to Grid'; I've tried changing the properties
dramatically then changing them back; I've tried beating my head
repeatedly against a brick wall; I've tried adjusting the properties
of the page and the tab control first; but no joy!

Thanks for your help,
Linda Patterson
Nov 13 '05 #1
5 5810
On 9 Aug 2004 01:49:06 -0700, li*************@hertshighways.org.uk
(Linda) wrote:
Hi,

I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).

These objects are all on different pages of a tab control. As far as
I know that means I can't select them all and use 'Align Left', 'Size
to Widest' etc., which is what I'd do with normal controls on a form.

I've turned off 'Snap to Grid'; I've tried changing the properties
dramatically then changing them back; I've tried beating my head
repeatedly against a brick wall; I've tried adjusting the properties
of the page and the tab control first; but no joy!

Thanks for your help,
Linda Patterson


I think it is not possible to avoid the rounding that Access makes
automatically. However, sometimes it helps to type in 0.445 to get
0.446.

HTH
Matthias Kläy
--
www.kcc.ch
Nov 13 '05 #2
Hi Linda

Try typing a value in twips, where 1440 twips = 1 inch. That is the actual
unit of measurement Access uses. For your example, you would type this into
the Properties box beside the Left property:
642 twips

You could also try assigning the property programmatically:
- Open your form in design view.
- Open the Immediate Window (Ctrl+G), and enter:
Forms!MyForm!MyTextBox.Left = 642

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Linda" <li*************@hertshighways.org.uk> wrote in message
news:a6*************************@posting.google.co m...
Hi,

I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).

These objects are all on different pages of a tab control. As far as
I know that means I can't select them all and use 'Align Left', 'Size
to Widest' etc., which is what I'd do with normal controls on a form.

I've turned off 'Snap to Grid'; I've tried changing the properties
dramatically then changing them back; I've tried beating my head
repeatedly against a brick wall; I've tried adjusting the properties
of the page and the tab control first; but no joy!

Thanks for your help,
Linda Patterson

Nov 13 '05 #3
li*************@hertshighways.org.uk (Linda) wrote:
I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).


In addition to the other responses, you can move objects on forms and
reports in design mode by holding down <Ctrl> and using the arrow keys.
<Shift> arrow keys re-sizes objects in design mode.

HTH - Keith.
www.keithwilby.org.uk
Nov 13 '05 #4
Keith/Allen/Matthias,

You guys are all gems - they sound like great ideas. I'll have a go
and let you know how I get on.

Many thanks,
Linda

Keith Wilby <ke*********@AwayWithYerCrap.com> wrote in message news:<Xn************************@10.15.188.42>...
li*************@hertshighways.org.uk (Linda) wrote:
I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).


In addition to the other responses, you can move objects on forms and
reports in design mode by holding down <Ctrl> and using the arrow keys.
<Shift> arrow keys re-sizes objects in design mode.

HTH - Keith.
www.keithwilby.org.uk

Nov 13 '05 #5
Matthias,

0.446 --> 0.448
0.445 --> 0.446

That is quite bizarre, although I've no doubt there's some "logic" to
it. A very simple solution, so thank you very much!

I'll save Allen's solutions (using VBA/using other units) for when
yours don't work, like if I desperately need something to be 0.447cm
wide! ;)

Thanks,
Linda

Matthias Klaey <mp**@hotmail.com> wrote in message news:<06********************************@4ax.com>. ..
On 9 Aug 2004 01:49:06 -0700, li*************@hertshighways.org.uk
(Linda) wrote:
Hi,

I'm trying to get the Left/Top/Height/Width properties for some text
boxes on a form to match exactly. Three of them are fine, but the
fourth will not accept the changes I type into the properties - it
automatically rounds them by an almost negligible amount (e.g. 0.446
become .0.448).

These objects are all on different pages of a tab control. As far as
I know that means I can't select them all and use 'Align Left', 'Size
to Widest' etc., which is what I'd do with normal controls on a form.

I've turned off 'Snap to Grid'; I've tried changing the properties
dramatically then changing them back; I've tried beating my head
repeatedly against a brick wall; I've tried adjusting the properties
of the page and the tab control first; but no joy!

Thanks for your help,
Linda Patterson


I think it is not possible to avoid the rounding that Access makes
automatically. However, sometimes it helps to type in 0.445 to get
0.446.

HTH
Matthias Kläy

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control...
0
by: Chris Millar | last post by:
I have a user control that i wish to extend to change the date when the user selects the numeric up down button. The code explains itself, hope someone can help. any ideas appreaciated.. ...
1
by: Tebogo Tefo via .NET 247 | last post by:
Hi I have a user control that contains three dropdownlists that I populate according to what was selected in the other dropdownlist (i.e. populate dropdownlist2 after selecting a value in...
9
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0's ImageMap Control to create 2 imagemaps, one directly below the other. When I do this a thin blank space appears between them. After several days of frustration I realized...
1
by: =?Utf-8?B?am9uZWZlcg==?= | last post by:
I keep getting the message after I converted a regular aspx page to now be based on a master page: "Only Content controls are allowed directly in a content page that contains Content controls."...
1
by: papalarge | last post by:
Hey all... I've been using the following to calculate the height the textbox needs to be in order to grow it vertically to its necessary size. textbox1.Height =...
4
by: Terry | last post by:
I am trying to figure out if there is a way to get a regular asp.net TextBox to fill the screen, both height and width. When I drop a TextBox onto a blank asp.net page and set the height="100%",...
1
by: Linda Liu[MSFT] | last post by:
Hi Moondaddy, I downloaded your sample project and run it on my machine. I did see the problem on my side. The image drawn in the Button is not as clear as that one drawn in the Image control. ...
2
by: moondaddy | last post by:
Below is some xaml that is a mockup of a control I'm building. It's a shape that will be used in a diagramming tool. The red, blue and green rectangles simulate connectors on the side of the...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.