Vertical Labels?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Vertical Labels?

Alex Greber
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Richard Sargent
Administrator
On Friday, March 13, 2015 at 3:29:21 AM UTC-7, Alex Greber wrote:
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

I don't think there is anything built-in to the Abt stuff. The "widget kit" stuff might, but I know nothing about it.

Assuming you want to use Abt parts, I suggest you study the difference between AbtPushButtonView and AbtDrawnButtonView (and their related classes, Cw... and OS...). Buttons are subclasses of labels, so there is a lot of similarity.

If you create an owner-drawn label part, you should be able to exert as much control over it as you wish. (Well, almost. Things like the area covered by a part is a rectangle and seems pretty fundamental to how all the parts work.)


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Long Haired David
In reply to this post by Alex Greber
We had to do a move of VAST from OS2 to Windows some years ago. I think that we did a rotated widget as part of that. I will check it out and get back.
David


On Friday, March 13, 2015 at 10:29:21 AM UTC, Alex Greber wrote:
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Long Haired David
In reply to this post by Alex Greber
We have an extension to CgDeviceIndepenedtImage that provides rotated180, rotated270 and rotated90. You can spin a bitmap and then put it into a label. Would that help. It is only three methods.

On Friday, March 13, 2015 at 10:29:21 AM UTC, Alex Greber wrote:
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
David
Totally Objects
Doing Smalltalk since 1989
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Alex Greber
Hi David.
Thanks for your reply!
Because the labels are read from a DB I cannot use your solution.
Regards Alex

Am Donnerstag, 19. März 2015 21:23:07 UTC+1 schrieb Totally Objects:
We have an extension to CgDeviceIndepenedtImage that provides rotated180, rotated270 and rotated90. You can spin a bitmap and then put it into a label. Would that help. It is only three methods.

On Friday, March 13, 2015 at 10:29:21 AM UTC, Alex Greber wrote:
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Richard Sargent
Administrator
On Thursday, March 26, 2015 at 7:38:40 AM UTC-7, Alex Greber wrote:
Hi David.
Thanks for your reply!
Because the labels are read from a DB I cannot use your solution.

Can you elaborate on this? I don't see why you conclude it isn't useful / feasible. If you had a million different labels, I could understand that might generate too many bitmaps. If there is a relatively limited set of labels, you could cache the corresponding images.


 
Regards Alex

Am Donnerstag, 19. März 2015 21:23:07 UTC+1 schrieb Totally Objects:
We have an extension to CgDeviceIndepenedtImage that provides rotated180, rotated270 and rotated90. You can spin a bitmap and then put it into a label. Would that help. It is only three methods.

On Friday, March 13, 2015 at 10:29:21 AM UTC, Alex Greber wrote:
Hi everybody.
Is there a way to display vertical oriented labels in vast? (a label rotated 90 degrees)
Regards Alex

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vertical Labels?

Sonja Stumpf
In reply to this post by Alex Greber
We made an extension to CgGC (similar to drawString: x y: y string: string)

drawStringRotated: x y: y string: string angle: angle

    "Draw a string rotated angle degrees."

    | osString logFont hFont hFontPrev |
 
     gcFunction == GXhighlight ifTrue: [^self drawStringXOR: x y: y string: string].

    PlatformString == String ifTrue: [
        osString := string asSBString ]
    ifFalse: [
        osString := PlatformString fromString: (gcFont  
    serverResource validateLeadBytes: string) ].

    winHdc setBkMode: Transparent.
 
    logFont := gcFont serverResource logFont.
    logFont lfEscapement: angle * 10.
    hFont := logFont createFontIndirect.
    hFontPrev := winHdc selectObject: hFont.
 
    winHdc
          textOut: x
          nYStart: y + 1
          lpszString: osString
          cbString: osString size.

     winHdc selectObject: hFontPrev.
     logFont lfEscapement: 0.
     hFont deleteObject.
     winHdc setBkMode: Opaque

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.