PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Nathan Durland on September 24, 2012, 01:19:50 PM

Title: Change color of RRButton
Post by: Nathan Durland on September 24, 2012, 01:19:50 PM
I'd like to change the color of an RRBUTTON control on the fly (basically, the buttons are toggles).   I originally tried FF_CONTROL_SETCOLOR, but was unsuccessful.  So I tried this, also without success:

  ''-----------------------------
  ' Update button color
  ''-----------------------------
  tLong1 = IIF(BtnStatus = "Y", OnColor, OffCOlor) ' these are set to %RBG_* value earlier
  SendMessage HWND_CALLFORM_CALLBTN(ControlIndex), %RBM_SETBKCOLOR, tLong1, %True
  FF_Control_Redraw HWND_CALLFORM_CALLBTN(ControlIndex)
  FF_DoEvents


I'm probably missing something pretty obvious (what's new?).  Any advice appreciated.

TIA
Title: Re: Change color of RRButton
Post by: Israel Vega Alvarez on September 24, 2012, 02:24:05 PM
For Fore Color you can use:

SendMessage HWND_CALLFORM_CALLBTN(ControlIndex),%RBM_SETTXTCOLOR,%BLUE,0

And for Back Color:

SendMessage HWND_CALLFORM_CALLBTN(ControlIndex),%RBM_SETBTNCOLOR,%YELLOW,0


Israel
Title: Re: Change color of RRButton
Post by: Nathan Durland on September 24, 2012, 05:51:48 PM
See?  I knew is was something obvious...

Thanks