Reputation: 1355
I have an application in PowerBuilder 12.5.1, with a read-only grid datawindow, part of a master-detail (PFC linkage service).
I would like to highlight some fields that contain certain strings. To do that, I made a global function f_colorforkeywords, that receives the string and returns the background color, white or yellow. In the datawindow, tab background, I set the background color as a function, that calls my global function:
f_colorforkeywords( content_of_this_field )
This works very well, even from the point of view of performances, in the PowerBuilder IDE: whenever new data is loaded, the grid gets the colors where I want them. But, when I compile an executable and run it, the global function is not called at all.
I also tried adding the global function in the PBR file, no success.
What is happening?
Upvotes: 1
Views: 1343
Reputation: 1
Is the issue that tabBackColor is not changing? In 12.5 under Window 7 this can be considered expected behavior. Turn on "Use Windows Classic mode under XP" and the changing of the tabBackColor will work. Without this checked, PowerBuilder defers to system colors. If Windows Classic mode is unacceptable, change the tabTextColor as your indicator instead of tabBackColor.
Upvotes: 0
Reputation: 4174
This may or may not be what you are seeing. I have seen inherited events lose the checkmark that says to "extend ancestor script".
I can't remember any rhyme or reason as to why the check box was removed but it might have been in cases where there wasn't any script in a descendant but then there was script in a lower level descendant.
This happened more than one time so it was a problem... hth
Class hierarchy sample
u_dw - ue_postopen has code
v
u_dw_udi - ue_postopen descendant had checkbox 'unchecked' for extend ancestor script (mysterious)
v
u_dw_app - ue_postopen descendant has code, not triggered because u_dw_udi did not extend and no explicit call super. If I recall this descendant had the checkbox so everything looked good, we had to put test debug messages all over before we figured this out. strange one.
I am not sure this solution is related to what you are seeing might not be. According to PB help the only things not copied to exe are.
If the DataWindow object d_emp is associated with a DataWindow control dynamically using the following statement, d_emp is not copied:
dw_info.DataObject = "d_emp"The bitmap files assigned dynamically in the following script are not copied:
IF Balance < 0 THEN p_logo.PictureName = "frown.bmp"ELSE p_logo.PictureName = "smile.bmp"END IFThe reference to window w_go in a string variable in the following window script is not found by PowerBuilder when building the executable file, so w_go is not copied to the executable file:
window mywinstring winname = "w_go"Open(mywin,winname)
Upvotes: 1