- Colin Cruikshank
- PowerBuilder
- Monday, 5 October 2020 01:32 PM UTC
Hello,
I have a mousemove script that changes the colour of the column header on a grid datawindow to indicate that the column header is clickable for sorting. The column header is a text control. I now want to use the theme feature, so in order to facilitate this, I have applied an expression with a modify statement to change the backcolour when the cursor hovers over. It is not working, however, when the theme is applied. Here is the code:
If Right( dwo.Name, 2 ) = '_t' AND &
pos( band_at_pointer, 'header', 1 ) > 0 AND &
this.Object.DataWindow.Processing = string( 1 ) Then
//They are hovering over a sortable dw grid column header
string rs
rs = this.Modify( dwo.Name + '.background.color="0~tRGB(0,0,255)"')
.....
The modify statement is succeeding ( returning an empty string ), but the back color is not changing. Futher, when I add the expression on the text control right in the painter, it still does not change. Interestingly enough, if I change the modify statement to:
rs = this.Modify( dwo.Name + '.color="0~tRGB(0,0,255)"')
The font color changes. In the article on Themes, the following statement about datawindows seems to indicate that I can override the text fields back colour:
"The settings of the background color and font color of Column, Text, Computed Field, and GroupBox controls by expression or the modify function has higher priorities than the theme settings (settings in the painter have no effect)."
Am I missing something horribly obvious here? I am using PowerBuilder 2019 R2 Build 2328.
Thanks in advance.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.