Author Topic: Change color of toolbar button at run-time  (Read 3053 times)

WynApse

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 17
    • View Profile
Change color of toolbar button at run-time
« on: November 27, 2019, 05:31:12 am »
Hello...

I'm trying to change the color of a toolbar button at run-time.

It looks to me like I need to lay in a different toolbar to do so, so I've tried that in the jsfiddle below.

At the very bottom there are 2 lines where I tried to assign the new toolbar -- one is commented, and neither of them is doing the job.

What am I doing wrong here?

Thanks!

https://jsfiddle.net/9ksrwqdg/

-Dave

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Change color of toolbar button at run-time
« Reply #1 on: November 27, 2019, 10:06:47 am »
Dave

Please use refreshToobar method after any change in toolbar item.

https://jsfiddle.net/Loth4wef/

https://paramquery.com/pro/api#method-refreshToolbar

WynApse

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Change color of toolbar button at run-time
« Reply #2 on: November 27, 2019, 07:31:18 pm »
yikes... I didn't see that methos

Thanks!