Where does the repaint need to be placed to work like should ?
Thanks.
Code: Select all
Global.i Window_0
Procedure OpenWindow_0(x = 0, y = 0, width = 730, height = 660)
Window_0 = OpenWindow(#PB_Any, #PB_Ignore, #PB_Ignore, width, height, "", #PB_Window_SystemMenu |#PB_Window_ScreenCentered)
ContainerGadget(#PB_Any, 8, 320, 325, 60)
Upd_H = SpinGadget(#PB_Any, 8, 10, 46, 22, 1,width/2,#PB_Spin_ReadOnly | #PB_Spin_Numeric)
TextGadget(#PB_Any, 60, 10, 28, 18, "Width")
Upd_spc = SpinGadget(#PB_Any, 92,10, 46, 22, 0,100,#PB_Spin_ReadOnly | #PB_Spin_Numeric)
TextGadget(#PB_Any, 144, 10, 66, 18,"Space / Parts")
Upd_prt= SpinGadget(#PB_Any, 216, 10, 46, 22, 0,height,#PB_Spin_ReadOnly | #PB_Spin_Numeric)
txt_klr=TextGadget(#PB_Any, 274,10, 40, 22,"0",#PB_Text_Border|#PB_Text_Center)
btn_rdw = ButtonGadget(#PB_Any, 56,36, 135, 24, "Draw Fader" )
chk_test = CheckBoxGadget(#PB_Any, 216, 36, 75, 24, "and Test" )
CloseGadgetList()
Canvas_0 = CanvasGadget(#PB_Any, x, y, 330, 320) ;, #PB_Canvas_Border )
Canvas_1 = CanvasGadget(#PB_Any,335, y, 385, 320)
Canvas_2 = CanvasGadget(#PB_Any,335, 325, 385, height)
Frame_1 = FrameGadget(#PB_Any, 120, 384, 196, 194,"Colors")
ContainerGadget(#PB_Any, 126, 400, 175, 170)
chk_VH = CheckBoxGadget(#PB_Any, 8, 140, 60, 18, "V H" )
chk_Label = CheckBoxGadget(#PB_Any, 8+90, 20, 60, 18, "Label")
chk_Boxed = CheckBoxGadget(#PB_Any, 8+90, 140, 60, 18, "Boxed")
CloseGadgetList()
Frame_0 = FrameGadget(#PB_Any, 10, 384, 100, 194,"Fader Type")
ContainerGadget(#PB_Any, 15, 400, 90, 170)
Opt_E = OptionGadget(#PB_Any, 8, 000, 60, 20, "E...")
Opt_L = OptionGadget(#PB_Any, 8, 020, 80, 20, "L...")
Opt_B = OptionGadget(#PB_Any, 8, 040, 80, 20, "B...")
Opt_G = OptionGadget(#PB_Any, 8, 060, 80, 20, "G...")
Opt_C = OptionGadget(#PB_Any, 8, 080, 80, 20, "C...")
Opt_M = OptionGadget(#PB_Any, 8, 100, 80, 20, "M...")
Opt_P = OptionGadget(#PB_Any, 8, 120, 80, 20, "P...")
Opt_S = OptionGadget(#PB_Any, 8, 140, 80, 20, "S...")
CloseGadgetList()
Frame_4 = FrameGadget(#PB_Any, 10, 580, 304, 50, "After Drawing")
ContainerGadget(#PB_Any, 16, 598, 290, 30)
BSaveData = ButtonGadget(#PB_Any, 4, 0, 120, 24, "Save Bitmap and Data")
BclpBitmap = ButtonGadget(#PB_Any, 136, 0, 70, 24, "Copy Bitmap")
BclpTekst = ButtonGadget(#PB_Any, 218, 0, 70, 24, "Copy Data")
CloseGadgetList()
EndProcedure
Procedure Window_0_Events(event)
Select event
Case #PB_Event_Repaint, #PB_Event_MoveWindow, #PB_Event_ActivateWindow :
StartDrawing(WindowOutput(Window_0))
Box(200,400, 18, 118, $fff)
StopDrawing()
Case #PB_Event_CloseWindow
ProcedureReturn #False
Case #PB_Event_Gadget
EndSelect
ProcedureReturn #True
EndProcedure
Procedure EventLoop()
OpenWindow_0()
While Window_0_Events(WaitWindowEvent())
Wend
EndProcedure
;************************************************************************
EventLoop()