dbTalk Databases Forums  

Rotate Text or label

comp.databases.ms-access comp.databases.ms-access


Discuss Rotate Text or label in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Phil Stanton
 
Posts: n/a

Default Rotate Text or label - 03-30-2009 , 09:49 AM






I am trying to create a form with about 100 text boxes or labels on it. I
can programmatically set the ControlSource or Caption, set the Top and Left
properties, but I also need to control each label's orientation. Some of
these labels are going to be pretty close together, so Stephen Leban's
solution where the rotated label appears in a square is not an option.

I already have the tables/ queries that hold the X and Y Co-ordinates of the
top left of the labels and it's angle.

Currently I am Excel to create a scatter chart with labels, but I would like
to use an all access solution

Any ideas please

Phil



Reply With Quote
  #2  
Old   
Allen Browne
 
Posts: n/a

Default Re: Rotate Text or label - 03-30-2009 , 07:11 PM






Presumably this is a form in Continuous Form view (not Datasheet), so the
Form Header section can have enough Height to handle a label that his its
Vertical property set to Yes.

It is possible to use the form's Open event to set the Height, Width, Left,
and Vertical properties of the text boxes you want, and the Visible property
to No for the text boxes you don't need.

Specify Height, Width, and Left in twips, where 1440 twips = 1 inch.

There is a problem with vertical text not showing in some fonts. Arial CYR
is one of the few that always works.

To be honest, I find myself doing this in report, but rarely in forms.
Perhaps your form is for display purposes only, or bound to a temporary
table. A normalized table would not have 100 fields.

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote

Quote:
I am trying to create a form with about 100 text boxes or labels on it. I
can programmatically set the ControlSource or Caption, set the Top and Left
properties, but I also need to control each label's orientation. Some of
these labels are going to be pretty close together, so Stephen Leban's
solution where the rotated label appears in a square is not an option.

I already have the tables/ queries that hold the X and Y Co-ordinates of
the top left of the labels and it's angle.

Currently I am Excel to create a scatter chart with labels, but I would
like to use an all access solution


Reply With Quote
  #3  
Old   
Phil Stanton
 
Posts: n/a

Default Re: Rotate Text or label - 03-31-2009 , 03:49 AM



I have recently had a lot of fun doing a dining room planner with up to 6
dining tables with up to 15 seating places per side which displays the
diners names. The tables can be "dragged" round the room, dimensions
changed, seats per side changed, orientation changed and single or double
sided. This obviously has 180 controls representing the seats. Here the
problem was simple(comparatively) that the textbox representing the seats
and diner's names were either printed horizontally or vertically. This was
all done in the detail section of a form.
A similarly designed report just "extracts" the information from the form's
controls

So this gave me the idea of replacing the reasonably messy method that I am
currently using with Excel to show the location of Member's boats in our
boat compound. The query that Excel gets it's information from has a
combined field of (Space No, Boat Name & Owner) = ControlSource, X
co-ordinate = Control.Left, Y Co-ordinate =Control.Bottom (I have to do a
calculation for that one) and Angle.... That's the problem

These all will be in the detail section of a single form.
You're right that the form is for display only.
Because our boat compound is roughly laid out on a grid pattern, horizontal
textboxes or labels will definitely overlap each other, and vertical label
probably will overlap. 45 degrees seems to work reasonably well, but
sometimes even that has to be fiddled to a different angle to stop 2 labels
overlapping.

So as I mentioned, Stephen Lebans solutions for rotating text are not on as
they have an opaque oblong box big enough to hold the rotated label

Thanks

Phil


"Allen Browne" <AllenBrowne (AT) SeeSig (DOT) Invalid> wrote

Quote:
Presumably this is a form in Continuous Form view (not Datasheet), so the
Form Header section can have enough Height to handle a label that his its
Vertical property set to Yes.

It is possible to use the form's Open event to set the Height, Width,
Left, and Vertical properties of the text boxes you want, and the Visible
property to No for the text boxes you don't need.

Specify Height, Width, and Left in twips, where 1440 twips = 1 inch.

There is a problem with vertical text not showing in some fonts. Arial CYR
is one of the few that always works.

To be honest, I find myself doing this in report, but rarely in forms.
Perhaps your form is for display purposes only, or bound to a temporary
table. A normalized table would not have 100 fields.

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:6c-dnXJEDsZHRk3UnZ2dnUVZ8qqWnZ2d (AT) posted (DOT) plusnet...
I am trying to create a form with about 100 text boxes or labels on it. I
can programmatically set the ControlSource or Caption, set the Top and
Left properties, but I also need to control each label's orientation. Some
of these labels are going to be pretty close together, so Stephen Leban's
solution where the rotated label appears in a square is not an option.

I already have the tables/ queries that hold the X and Y Co-ordinates of
the top left of the labels and it's angle.

Currently I am Excel to create a scatter chart with labels, but I would
like to use an all access solution




Reply With Quote
  #4  
Old   
Allen Browne
 
Posts: n/a

Default Re: Rotate Text or label - 03-31-2009 , 06:56 AM



You won't be able to rotate the text box or label in 45 deg. increments in
Access.

This sounds like the kind of thing you might try in Visio. I have seen some
creative Visio designs where the data is stored in JET tables, and the
objects laid out on screen as desired.

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote

Quote:
I have recently had a lot of fun doing a dining room planner with up to 6
dining tables with up to 15 seating places per side which displays the
diners names. The tables can be "dragged" round the room, dimensions
changed, seats per side changed, orientation changed and single or double
sided. This obviously has 180 controls representing the seats. Here the
problem was simple(comparatively) that the textbox representing the seats
and diner's names were either printed horizontally or vertically. This was
all done in the detail section of a form.
A similarly designed report just "extracts" the information from the
form's controls

So this gave me the idea of replacing the reasonably messy method that I
am currently using with Excel to show the location of Member's boats in
our boat compound. The query that Excel gets it's information from has a
combined field of (Space No, Boat Name & Owner) = ControlSource, X
co-ordinate = Control.Left, Y Co-ordinate =Control.Bottom (I have to do a
calculation for that one) and Angle.... That's the problem

These all will be in the detail section of a single form.
You're right that the form is for display only.
Because our boat compound is roughly laid out on a grid pattern,
horizontal textboxes or labels will definitely overlap each other, and
vertical label probably will overlap. 45 degrees seems to work reasonably
well, but sometimes even that has to be fiddled to a different angle to
stop 2 labels overlapping.

So as I mentioned, Stephen Lebans solutions for rotating text are not on
as they have an opaque oblong box big enough to hold the rotated label

Thanks

Phil


"Allen Browne" <AllenBrowne (AT) SeeSig (DOT) Invalid> wrote in message
news:49d15fb9$0$29866$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au...
Presumably this is a form in Continuous Form view (not Datasheet), so the
Form Header section can have enough Height to handle a label that his its
Vertical property set to Yes.

It is possible to use the form's Open event to set the Height, Width,
Left, and Vertical properties of the text boxes you want, and the Visible
property to No for the text boxes you don't need.

Specify Height, Width, and Left in twips, where 1440 twips = 1 inch.

There is a problem with vertical text not showing in some fonts. Arial
CYR is one of the few that always works.

To be honest, I find myself doing this in report, but rarely in forms.
Perhaps your form is for display purposes only, or bound to a temporary
table. A normalized table would not have 100 fields.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:6c-dnXJEDsZHRk3UnZ2dnUVZ8qqWnZ2d (AT) posted (DOT) plusnet...
I am trying to create a form with about 100 text boxes or labels on it. I
can programmatically set the ControlSource or Caption, set the Top and
Left properties, but I also need to control each label's orientation.
Some of these labels are going to be pretty close together, so Stephen
Leban's solution where the rotated label appears in a square is not an
option.

I already have the tables/ queries that hold the X and Y Co-ordinates of
the top left of the labels and it's angle.

Currently I am Excel to create a scatter chart with labels, but I would
like to use an all access solution


Reply With Quote
  #5  
Old   
Phil Stanton
 
Posts: n/a

Default Re: Rotate Text or label - 03-31-2009 , 11:15 AM



OK, Thanks Allen

Might as well stick where I am with the Excel solution.

BTW, I had found something on the net that purported to rotate text. It used

Private Sub Text4_Click()

SetGraphicsMode Me.hDC, GM_ADVANCED
tLF.lfEscapement = 300 ' This is the angle to display at x 10
tLF.lfOrientation = 1200 ' Set the angle to display the characters at x
10
hFnt = CreateFontIndirect(tLF)

' Select the font into the Form's Device context, storing the font that
was already there
hFntOld = SelectObject(Me.hDC, hFnt)

End Sub

Unfortunately the Me.hDC would not compile. Any Idea what .hDC is. I can
only presume it is something in Access after my AK2 version

Phil

"Allen Browne" <AllenBrowne (AT) SeeSig (DOT) Invalid> wrote

Quote:
You won't be able to rotate the text box or label in 45 deg. increments in
Access.

This sounds like the kind of thing you might try in Visio. I have seen
some creative Visio designs where the data is stored in JET tables, and
the objects laid out on screen as desired.

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:UYCdnfnAMoqfREzUnZ2dnUVZ8vOdnZ2d (AT) posted (DOT) plusnet...
I have recently had a lot of fun doing a dining room planner with up to 6
dining tables with up to 15 seating places per side which displays the
diners names. The tables can be "dragged" round the room, dimensions
changed, seats per side changed, orientation changed and single or double
sided. This obviously has 180 controls representing the seats. Here the
problem was simple(comparatively) that the textbox representing the seats
and diner's names were either printed horizontally or vertically. This was
all done in the detail section of a form.
A similarly designed report just "extracts" the information from the
form's controls

So this gave me the idea of replacing the reasonably messy method that I
am currently using with Excel to show the location of Member's boats in
our boat compound. The query that Excel gets it's information from has a
combined field of (Space No, Boat Name & Owner) = ControlSource, X
co-ordinate = Control.Left, Y Co-ordinate =Control.Bottom (I have to do a
calculation for that one) and Angle.... That's the problem

These all will be in the detail section of a single form.
You're right that the form is for display only.
Because our boat compound is roughly laid out on a grid pattern,
horizontal textboxes or labels will definitely overlap each other, and
vertical label probably will overlap. 45 degrees seems to work reasonably
well, but sometimes even that has to be fiddled to a different angle to
stop 2 labels overlapping.

So as I mentioned, Stephen Lebans solutions for rotating text are not on
as they have an opaque oblong box big enough to hold the rotated label

Thanks

Phil


"Allen Browne" <AllenBrowne (AT) SeeSig (DOT) Invalid> wrote in message
news:49d15fb9$0$29866$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au...
Presumably this is a form in Continuous Form view (not Datasheet), so
the Form Header section can have enough Height to handle a label that
his its Vertical property set to Yes.

It is possible to use the form's Open event to set the Height, Width,
Left, and Vertical properties of the text boxes you want, and the
Visible property to No for the text boxes you don't need.

Specify Height, Width, and Left in twips, where 1440 twips = 1 inch.

There is a problem with vertical text not showing in some fonts. Arial
CYR is one of the few that always works.

To be honest, I find myself doing this in report, but rarely in forms.
Perhaps your form is for display purposes only, or bound to a temporary
table. A normalized table would not have 100 fields.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:6c-dnXJEDsZHRk3UnZ2dnUVZ8qqWnZ2d (AT) posted (DOT) plusnet...
I am trying to create a form with about 100 text boxes or labels on it.
I can programmatically set the ControlSource or Caption, set the Top and
Left properties, but I also need to control each label's orientation.
Some of these labels are going to be pretty close together, so Stephen
Leban's solution where the rotated label appears in a square is not an
option.

I already have the tables/ queries that hold the X and Y Co-ordinates
of the top left of the labels and it's angle.

Currently I am Excel to create a scatter chart with labels, but I would
like to use an all access solution




Reply With Quote
  #6  
Old   
Allen Browne
 
Posts: n/a

Default Re: Rotate Text or label - 04-01-2009 , 09:18 AM



May be an API structure, e.g.:
http://vbnet.mvps.org/index.html?cod...aysettings.htm

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote

Quote:
OK, Thanks Allen

Might as well stick where I am with the Excel solution.

BTW, I had found something on the net that purported to rotate text. It
used

Private Sub Text4_Click()

SetGraphicsMode Me.hDC, GM_ADVANCED
tLF.lfEscapement = 300 ' This is the angle to display at x 10
tLF.lfOrientation = 1200 ' Set the angle to display the characters at x
10
hFnt = CreateFontIndirect(tLF)

' Select the font into the Form's Device context, storing the font that
was already there
hFntOld = SelectObject(Me.hDC, hFnt)

End Sub

Unfortunately the Me.hDC would not compile. Any Idea what .hDC is. I can
only presume it is something in Access after my AK2 version

Phil


Reply With Quote
  #7  
Old   
Phil Stanton
 
Posts: n/a

Default Re: Rotate Text or label - 04-01-2009 , 12:00 PM



Thanks Allen. Later version of Access than mine.

Phil
"Allen Browne" <AllenBrowne (AT) SeeSig (DOT) Invalid> wrote

Quote:
May be an API structure, e.g.:
http://vbnet.mvps.org/index.html?cod...aysettings.htm

--
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.

"Phil Stanton" <phil (AT) myfamilyname (DOT) co.uk> wrote in message
news:-IOdnfmO58cI3E_UnZ2dnUVZ8hednZ2d (AT) posted (DOT) plusnet...
OK, Thanks Allen

Might as well stick where I am with the Excel solution.

BTW, I had found something on the net that purported to rotate text. It
used

Private Sub Text4_Click()

SetGraphicsMode Me.hDC, GM_ADVANCED
tLF.lfEscapement = 300 ' This is the angle to display at x 10
tLF.lfOrientation = 1200 ' Set the angle to display the characters at
x 10
hFnt = CreateFontIndirect(tLF)

' Select the font into the Form's Device context, storing the font
that was already there
hFntOld = SelectObject(Me.hDC, hFnt)

End Sub

Unfortunately the Me.hDC would not compile. Any Idea what .hDC is. I can
only presume it is something in Access after my AK2 version

Phil




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.