I tried to use dynamic highlighting of different controls (it's very good reminder/warning/help) but succeeded only with radiobuttons. Here is text example with GUI and callback which changes colors. Click on radiobutton and see that it works OK. But changing number to 10 should change its background color but it does not. Buttons also do not change colors. Am i wrong with something?
use clrwin
common lcRb, krb, lcButton, Number, lcNumber
integer, external :: cbChng
krb = 0
Number = 9
i=winio@('%ww&')
i=winio@('Highlight rb %ta%^rb[HighLight me]%lc%ff&', krb, cbChng, lcRb)
i=winio@('Highlight if >10 %ta%dd%6^rd%lc%ff&',1, Number, cbChng, lcNumber)
i=winio@('%cn%^bt[Highlight Button]%lc %bt[Exit]&', cbChng, lcButton)
i=winio@('%ac[esc]','exit')
end
integer function cbChng()
use clrwin
common lcRb, krb, lcButton, Number, lcNumber
if(krb.eq.0) icolRb = RGB@(255,255,255)
if(krb.eq.1) icolRb = RGB@(255,190,255)
call set_control_back_colour@(lcRb, icolRb)
if(Number.lt.10) icolNumber = RGB@(255,255,255)
if(Number.ge.10) icolNumber = RGB@(255,190,255)
call set_control_back_colour@(lcNumber,icolNumber)
call set_control_back_colour@(lcButton,icolRb)
cbChng=2
end function