Zooming Editorgadget (Windows-only )

Share your advanced PureBasic knowledge/code with the community.
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Zooming Editorgadget (Windows-only )

Post by Rings »

Code: Select all

#WindowWidth  = 600
#WindowHeight = 400
If OpenWindow(0, 100, 200, #WindowWidth, #WindowHeight, #PB_Window_MinimizeGadget, "PureBasic - EditorGadget Zooming")
 If CreateGadgetList(WindowID())
  rhwnd=EditorGadget(0,1,60,#WindowWidth  ,#Windowheight-60)
  SetGadgetText(0,"Purebasic rocks!")
  Maxrange=300
  MaxD=Maxrange/64 +1
  TrackBarGadget(1, 1, 1, #WindowWidth, 40, 1, Maxrange ) 
  TextGadget(2,2,40,400,14,"Set Zooming of Editgadget with Trackbar")
 EndIf
 
 Repeat 
  EventID = WaitWindowEvent()
  If EventID = #PB_EventGadget
   If EventGadgetID()=1
     Value=GetGadgetState(1)
     lRet=SendMessage_(rhwnd,#EM_SetZoom,Value,MaxD)
     If lRet=0 
      Debug "Error, Cannot set new zooming Range"
     EndIf
   EndIf
  EndIf
 Until EventID = #PB_EventCloseWindow
EndIf 
SPAMINATOR NR.1
Hi-Toro
Enthusiast
Enthusiast
Posts: 270
Joined: Sat Apr 26, 2003 3:23 pm

Post by Hi-Toro »

Oh, very nice!
James Boyd
http://www.hi-toro.com/
Death to the Pixies!
TronDoc
Enthusiast
Enthusiast
Posts: 310
Joined: Wed Apr 30, 2003 3:50 am
Location: 3DoorsDown

Post by TronDoc »

you are too cool Rings!
--jb
peace
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
Post Reply