Ok, I want the ListViewGadget to pulse when selecting an item
sooo what's the easiest way to get this to fade to black then back to white? SetGadgetColor(2, #PB_Gadget_FrontColor, $FFFFFF)
Do I chuck it in a quick loop while adjusting the colour? If so how easy is it do put this $FFFFFF in a quick loop?
Cheers!
SetGadgetColor
Re: SetGadgetColor
Maybe this could push you in the right direction.
Code: Select all
OpenWindow(0,0,0,200,300,"Flashing ...", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ListViewGadget(0,5,5,190,290)
For n = 1 To 37
AddGadgetItem(0,-1,"Hello, I'm Line number "+Str(n))
Next
Color = 255 ; starting from white
stepper = 32 ; stepping up/down 32 shades
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Timer
color - stepper
If color < 0
color = 255 ; set back to white
RemoveWindowTimer(0,0) ; remove timer
EndIf
SetGadgetColor(0,#PB_Gadget_BackColor, RGB(Color, Color, Color)) ; set actual color
Case #PB_Event_Gadget
If EventGadget() = 0
If EventType() = #PB_EventType_LeftClick
AddWindowTimer(0,0,10) ; Change color every 10ms
EndIf
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
Re: SetGadgetColor
Thanks! Did not realise I could throw RGB in there lol, beats my embarrassing attempt
Code: Select all
SetGadgetColor(2, #PB_Gadget_FrontColor, $FFFFFF)
SetGadgetColor(2, #PB_Gadget_FrontColor, $EEEEEE) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $DDDDDD) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $CCCCCC) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $BBBBBB) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $AAAAAA) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $999999) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $888888) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $777777) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $555555) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $333333) : Delay(5)
SetGadgetColor(2, #PB_Gadget_FrontColor, $111111) : Delay(5)
FileName$ = ReplaceString(GetGadgetText(2)," ","%20")
SetGadgetState(2,-1)
*buf = ReceiveHTTPMemory("http://www.omdbapi.com/?t=" + FileName$)
OMDB$ = PeekS(*buf,-1,#PB_Ascii)
SetGadgetColor(2, #PB_Gadget_FrontColor, $111111) : Delay(5)
SetGadgetColor(2, #PB_Gadget_FrontColor, $333333) : Delay(5)
SetGadgetColor(2, #PB_Gadget_FrontColor, $555555) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $777777) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $999999) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $BBBBBB) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $CCCCCC) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $DDDDDD) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $EEEEEE) : Delay(10)
SetGadgetColor(2, #PB_Gadget_FrontColor, $FFFFFF) : Delay(10)Re: SetGadgetColor
Don´t use Delay() with Gadget functions. Always need a Event-Loop for update window...
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive


