Aligning a rectangle control with Layout gridlines (1 Viewer)

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
Hello all,

I've been so impressed with all the assistance you kind folks have offered me over the last couple weeks, so I'm back with another question.

I have a form set up for data entry, continuous form with a header. One of the fields is a Yes/No checkbox.

As I'm sure you've all seen, the default alignment of checkboxes if you use the Layout grid (in my case, a tabular layout) is to do an ugly upper left alignment of the checkbox. Just looks bad.

To get around that, I am adding the checkbox outside of the layout. Basically, set up all the fields to the left of the checkbox in one tabular layout, checkbox, then all the fields on the right in another tabular layout mimicking the first.

What I want to do is spoof the gridlines that appear in the layouts with a rectangle around the checkbox.

How can I find the height/width of the Layout's "gridlines" so that I can align my rectangle properly?

Thanks in advance!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:21
Joined
Oct 29, 2018
Messages
21,477
Hi. Not sure I understand, but the layout borders should be the same size as largest control in it with maybe some amount of padding or margin.
 

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
Hi. Not sure I understand, but the layout borders should be the same size as largest control in it with maybe some amount of padding or margin.
Exactly, I'm just trying to find out what property of the that largest control I can use to index my rectangle from.

My understanding is that padding = distance from other controls, margin = distance from the control content to control border.

However... the gridlines are (or appear to be) outside the border of the control, and I'm curious to know if there's a known constant of how much, or a property I can tap into that will help.

Any further input is greatly appreciated. I can certainly experiment and likely make it work, but I like the idea of an elegant solution.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:21
Joined
Oct 29, 2018
Messages
21,477
Exactly, I'm just trying to find out what property of the that largest control I can use to index my rectangle from.

My understanding is that padding = distance from other controls, margin = distance from the control content to control border.

However... the gridlines are (or appear to be) outside the border of the control, and I'm curious to know if there's a known constant of how much, or a property I can tap into that will help.

Any further input is greatly appreciated. I can certainly experiment and likely make it work, but I like the idea of an elegant solution.
Hi. To help me understand the problem, can you post a screenshot with annotations to point out the issue with the checkbox? Thank you.
 

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
A checkbox in a typical layout just looks nasty:
Screenshot 2021-03-09 132241.png

Or so it does to me, I don't like the upper left alignment of the checkbox.

Below, we see what I did to alleviate this:
Screenshot 2021-03-09 132025.png

On the left of the checkbox is one tabular layout, on the right is another.

The checkbox itself is not in a layout:
1615314300038.png

That's the label for the field header, plus the checkbox control itself, and a rectangle drawn to look like the "Gridlines" of the Layout.

It's not currently well aligned, and to truly get the effect I suppose I'd need to emulate the border on the adjacent cells too, but here's what it looks like in Form view:
1615314421408.png


Just in looking at it under the microscope, I'm realizing that two horizontal lines is probably better/easier than the rectangle. Already ran into the known bug of the rectangle refusing to display a <3pt width black #000000 border, so now it's #000001 all around, which is annoying anyway.

But I still want to properly align that label textbox with the other column headings on the top row, and I still want to get either the rectangle or horizontal lines properly aligned with the rest of the gridlines.

Thoughts?
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 23:21
Joined
May 21, 2018
Messages
8,536
If you cannot get the effect you are looking for you can find some examples in the forum of custom check boxes using a textbox and wingdings font or using a bound image. This allows much larger checks. I often use a combo (yes, No) because that can use conditional formatting too.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:21
Joined
Oct 29, 2018
Messages
21,477
Hi. Thanks for posting some screenshots. Is this close enough to what you're trying to do?
1615315582411.png

1615315605939.png
 

MajP

You've got your good things, and you've got mine.
Local time
Yesterday, 23:21
Joined
May 21, 2018
Messages
8,536
 

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
Was just reading through Allen Browne's thoughts on WingDings and checkboxes in general too. Thanks for the ideas!

I'll admit, the amount of time I spend adding functionality in our database versus the time spent finagling Access's weird limitations is... unfortunate.

I mean, Access is obsolete software now, anyway, but up until it wasn't, it was still stuck about 5 years behind the rest of the Office suite in terms of UI and formatting capabilities, or so it seems to me.
 

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
Hi. Thanks for posting some screenshots. Is this close enough to what you're trying to do?
View attachment 89831
View attachment 89832
Yes! My issue has been that if I try to position the checkbox in the Layout it snaps into that particular square of the layout. It looks like you have avoided this somehow?

How did you pull this off? Definitely good enough for my use case...
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:21
Joined
Oct 29, 2018
Messages
21,477
Yes! My issue has been that if I try to position the checkbox in the Layout it snaps into that particular square of the layout. It looks like you have avoided this somehow?

How did you pull this off? Definitely good enough for my use case...
I basically cheated and added an extra grid for the checkbox.
 

jumnhy

Member
Local time
Yesterday, 23:21
Joined
Feb 25, 2021
Messages
68
Can you elaborate? I'm confused here. I've also seen (elsewhere) the suggestion to just split the grid into multiple squares and use the empty split cells as pseudo-margins for the checkbox--is that what you're doing?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 20:21
Joined
Oct 29, 2018
Messages
21,477
Can you elaborate? I'm confused here. I've also seen (elsewhere) the suggestion to just split the grid into multiple squares and use the empty split cells as pseudo-margins for the checkbox--is that what you're doing?
Yes, that's exactly what I did. I just thought that was a lot easier than using other techniques but wasn't sure if the result was good enough for your needs.
 

Users who are viewing this thread

Top Bottom