EditorGadGet
Re: EditorGadGet
Yes, or CocoaMessage(0,GadgetID(0),"display") to force display update.
-
spacebuddy
- Enthusiast

- Posts: 364
- Joined: Thu Jul 02, 2009 5:42 am
Re: EditorGadGet
Zooming text in and out is very complicated, to complicated for my head
if I zoom 0.5 a few times then set it back to 1 not zooming back properly
if I zoom 0.5 a few times then set it back to 1 not zooming back properly
Re: EditorGadGet
Zooming with 1 does nothing. If you zoom with 0.5 for 3 times, you need to zoom with 2.0 for 3 times to go back.
For absolute Zoom values, use this, and see documentation for it:
For absolute Zoom values, use this, and see documentation for it:
Code: Select all
w = GadgetWidth(0)
h = GadgetHeight(0)
SmallerZoom.f = 1.0 ; 1.0 = 100%
; 2.0 = 2 times smaller (half size)
; 0.5 = 2 times bigger (double size)
; -1.0 = 100% size, and mirrored/switched
size.NSSize
size\width = w * SmallerZoom
size\height = h * SmallerZoom
CocoaMessage(0,GadgetID(0),"setBoundsSize:@",@size)
CocoaMessage(0,GadgetID(0),"display")