Seite 1 von 1
Blinkender Button-Text
Verfasst: 17.01.2006 20:07
von John Doe
Hallo Forum,
ist es möglich den Button-Text blinken zu lassen, oder auch in unterschiedlichen Textfarben blinken zu lassen (rot - schwarz - rot ....) ???
Verfasst: 17.01.2006 20:40
von ts-soft
Gibts verschiedene Möglichkeiten.
Code: Alles auswählen
Procedure BlinkTimer()
Static State
State!1
SetGadgetState(0, UseImage(State))
EndProcedure
CreateImage(0, 60, 25)
StartDrawing(ImageOutput())
DrawingMode(1)
Box(0,0,60,25,GetSysColor_(#COLOR_BTNFACE))
FrontColor(234, 80, 21)
Locate(10, 5)
DrawText("Hallo")
StopDrawing()
CreateImage(1, 60, 25)
StartDrawing(ImageOutput())
DrawingMode(1)
Box(0,0,60,25,GetSysColor_(#COLOR_BTNFACE))
FrontColor(23, 68, 232)
Locate(10, 5)
DrawText("Hallo")
StopDrawing()
If OpenWindow(0, #CW_USEDEFAULT, #CW_USEDEFAULT, 60, 40, #PB_Window_SystemMenu, "")
If CreateGadgetList(WindowID(0))
ButtonImageGadget(0, 10, 10, 60, 25, UseImage(0))
EndIf
SetTimer_(WindowID(0), 0, 500, @BlinkTimer())
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Verfasst: 18.01.2006 19:43
von John Doe