dbTalk Databases Forums  

Rotated Labels or TextBoxes

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


Discuss Rotated Labels or TextBoxes in the comp.databases.ms-access forum.



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

Default Rotated Labels or TextBoxes - 03-17-2011 , 12:10 PM






Sorry to re-post this query, but I am getting nowhere.
I would like either a rotated Label or TextBox on a form, rotatable to any
angle that I specify (Not vertical). The label or text box must either be
transparent with just the writing shown on it, so that if it overlaps other
controls, it doesn't obscure them (except here the writing is) or the size of
the control must be the same size as the text. Stephen Leban's
RotateLabelVer2.OCX control unfortunately won't do as the label appears in an
opaque box so that if a number of them are overlapping in such a way that the
text itself is clear of all the other text, the corner of one box obliterates
the text in the box below.
so to be specific, suppose I have 5 identical Text boxes, all with the same
writing say 1/4" high and 2" long all at 45 degrees. I want to space these
boxes along a horizontal line 1/3" appart. Stephen ends up with an opaque box
about 1.5" square so the top left habd corner of the scond box cuts accross
the writing in the first box ... and so on I have even tried playing with
Stephen's source code to try to make the box transparent, but to no avail,
although this is the first time I have looked at VB6 so I may have missed
something.

Any other thought please
Phil

Reply With Quote
  #2  
Old   
Christian Lott
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-17-2011 , 06:16 PM






Quote:
Any other thought please
Phil
I've used a png image. But you can't drag and drop it, you can't
import it as a logo, the best result is to drop an image control on
the form.

Reply With Quote
  #3  
Old   
Salad
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-17-2011 , 09:06 PM



Phil wrote:
Quote:
Sorry to re-post this query, but I am getting nowhere.
I would like either a rotated Label or TextBox on a form, rotatable to any
angle that I specify (Not vertical). The label or text box must either be
transparent with just the writing shown on it, so that if it overlaps other
controls, it doesn't obscure them (except here the writing is) or the size of
the control must be the same size as the text. Stephen Leban's
RotateLabelVer2.OCX control unfortunately won't do as the label appears in an
opaque box so that if a number of them are overlapping in such a way that the
text itself is clear of all the other text, the corner of one box obliterates
the text in the box below.
so to be specific, suppose I have 5 identical Text boxes, all with the same
writing say 1/4" high and 2" long all at 45 degrees. I want to space these
boxes along a horizontal line 1/3" appart. Stephen ends up with an opaque box
about 1.5" square so the top left habd corner of the scond box cuts accross
the writing in the first box ... and so on I have even tried playing with
Stephen's source code to try to make the box transparent, but to no avail,
although this is the first time I have looked at VB6 so I may have missed
something.

Any other thought please
Phil
Can you use Excel for this or must it be in Access? With Excel you can
rotate text easily enough.

Reply With Quote
  #4  
Old   
Phil
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 04:48 AM



On 18/03/2011 03:06:46, Salad wrote:
Quote:
Phil wrote:
Sorry to re-post this query, but I am getting nowhere.
I would like either a rotated Label or TextBox on a form, rotatable to any
angle that I specify (Not vertical). The label or text box must either be
transparent with just the writing shown on it, so that if it overlaps other
controls, it doesn't obscure them (except here the writing is) or the size of
the control must be the same size as the text. Stephen Leban's
RotateLabelVer2.OCX control unfortunately won't do as the label appears in an
opaque box so that if a number of them are overlapping in such a way that the
text itself is clear of all the other text, the corner of one box obliterates
the text in the box below.
so to be specific, suppose I have 5 identical Text boxes, all with the same
writing say 1/4" high and 2" long all at 45 degrees. I want to space these
boxes along a horizontal line 1/3" appart. Stephen ends up with an opaque box
about 1.5" square so the top left habd corner of the scond box cuts accross
the writing in the first box ... and so on I have even tried playing with
Stephen's source code to try to make the box transparent, but to no avail,
although this is the first time I have looked at VB6 so I may have missed
something.

Any other thought please
Phil

Can you use Excel for this or must it be in Access? With Excel you can
rotate text easily enough.


Hi Salad.
I have been using the Excel method successfully for a number of years. The
data gets pushed into Excel, a scatter chart is produced with the labels
positioned and oriented according to the information (X, Y and Angle) within
Access. Then I create and save a GIF file showing the labels and the
background picture which I display as an image on an Access form. Works
perfectly OK, but it is messy. Within Access, I have developed software for
dragging around, and setting the orientation of Stephen's OCX "Text boxes" or
any other object for that matter. So visually it is simple to create a new
map showing where the 100 boats are located within the compound. The labels
show the boat name and owner. Frequently it is easier if these labels are
displayed at 45 degrees to stop the names overlapping each other. However,
with Stephen's control, there is effectively an opaque box bounding the label
(see original posting) which obscures the label underneath.

Phil

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

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 11:34 AM



On 18/03/2011 00:16:33, Christian Lott wrote:
Quote:
Any other thought please
Phil

I've used a png image. But you can't drag and drop it, you can't
import it as a logo, the best result is to drop an image control on
the form.

Thanks Christian
Although I think I can have a transparent image, I'm not so sure about a
transparent PNG image. Experiments with photoshop say that it can be done,
might work on a WEB page, but certainly doesn't appear possible when the
image is viewed with Paint or loaded into an image on the form.

I would have no problem dragging the image round the form, but would not be
able to rotate the PNG file within the image.

Phil

Reply With Quote
  #6  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 11:55 AM



Quote:
Although I think I can have a transparent image, I'm not so sure about a
transparent PNG image. Experiments with photoshop say that it can be done,
might work on a WEB page, but certainly doesn't appear possible when the
image is viewed with Paint or loaded into an image on the form.
I have the opposite experience. I create the text in Inkscape, export
as png and the image is transparent. Converting it into a bmp w/ MS
Paint though forces the background to WHITE.


Quote:
I would have no problem dragging the image round the form, but would not be
able to rotate the PNG file within the image.
The thing I was saying about 'drag & drop' - I mean that if you drag
and drop the image from your desktop onto an Access Form it creates an
OLE object or something which degrades the picture quality. Same with
the 'Logo' ('import picture as a logo') - I finally realized if I used
the Image control (the on with the mountains and sun icon) it displays
correctly.

Yes, the image would need to be pre rotated before you imported it. To
autogenerate images on the fly I would use something like ImageMagic:

http://www.imagemagick.org/script/index.php

Originally you said though:

Quote:
I have 5 identical Text boxes, all with the same
writing say 1/4" high and 2" long all at 45 degrees. I want to space these
boxes along a horizontal line 1/3" appart.

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

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 01:22 PM



On 18/03/2011 17:55:32, "christianlott1 (AT) yahoo (DOT) com" wrote:
Quote:
Although I think I can have a transparent image, I'm not so sure about a
transparent PNG image. Experiments with photoshop say that it can be done,
might work on a WEB page, but certainly doesn't appear possible when the
image is viewed with Paint or loaded into an image on the form.

I have the opposite experience. I create the text in Inkscape, export
as png and the image is transparent. Converting it into a bmp w/ MS
Paint though forces the background to WHITE.


I would have no problem dragging the image round the form, but would not be
able to rotate the PNG file within the image.

The thing I was saying about 'drag & drop' - I mean that if you drag
and drop the image from your desktop onto an Access Form it creates an
OLE object or something which degrades the picture quality. Same with
the 'Logo' ('import picture as a logo') - I finally realized if I used
the Image control (the on with the mountains and sun icon) it displays
correctly.

Yes, the image would need to be pre rotated before you imported it. To
autogenerate images on the fly I would use something like ImageMagic:

http://www.imagemagick.org/script/index.php

Originally you said though:

I have 5 identical Text boxes, all with the same
writing say 1/4" high and 2" long all at 45 degrees. I want to space these
boxes along a horizontal line 1/3" appart.

Thanks Christian

I will get a copy of ImageMagic & have a go

Mea culpa, I lied about the identical text boxes. The ones I have used so far
actually change their width to accommodate the length of the data they
contain. The height tends to be the same as I use the same font for each one.
Equally within my Access table I give the XY co-ordinates of each box (.Top &
Left) together the angle.

Will see where your thought lead

Thanks

Phil

Reply With Quote
  #8  
Old   
christianlott1@yahoo.com
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 02:26 PM



Quote:
Will see where your thought lead
Been a few years but I was using the shell command to do mass re-
colorizing of scanned documents in Imagemagic. I'll see if I can find
the db because I think there was some kind of issue with formatting
those commands to shell.

I also wanted to use tilted labels in a report. Now might be a good
time to try it out this way.

Reply With Quote
  #9  
Old   
Christian Lott
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-18-2011 , 09:17 PM



This is what I was using last time I played w/ Imagemagic:

----------------------------------------------------
Sub down_conv_jpg2()
Dim sPath As String
Dim sCmd As String
Dim sFileIN As String
Dim sFileOUT As String
Dim sGO As String
Dim sINpath As String
Dim sOUTpath As String

sPath = "c:\progra~1\ImageMagick-6.3.5-Q16\"
sCmd = "convert.exe -quality 30 "
sINpath = "C:\temp5\pic\"
sOUTpath = "C:\temp5\pic\"


Dim i As Integer
For i = 496 To 525
sFileIN = "CIMG0" & i & ".JPG"
sFileOUT = "IMG" & i & ".JPG"

sGO = sPath & sCmd & sINpath & sFileIN & " " & sOUTpath & sFileOUT
Debug.Print sGO
ShellWait (sGO)
DoEvents
Next i
Debug.Print "DONE!"
End Sub

----------------------------------------------

The two problems I came into were the long file name for the path ("c:
\progra~1") and having to use this ShellWait in a loop:

http://www.mvps.org/access/api/api0004.htm

( Found but never used this: http://en.wikibooks.org/wiki/Visual_...rnal_Processes
)


Also:

http://www.imagemagick.org/Usage/

Reply With Quote
  #10  
Old   
Christian Lott
 
Posts: n/a

Default Re: Rotated Labels or TextBoxes - 03-19-2011 , 11:05 AM



http://www.imagemagick.org/Usage/windows/

At the bottom of this page there are several example using WSH.

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.