- Martin Kaltenböck
- PowerBuilder
- Thursday, 8 March 2018 08:57 AM UTC
Migrating from PB 12.1 to PB 2017 R2, I found a behaviour change with the setcolumn()-function of the datawindow.
In some freeform datawindows I implemented to skip some columns, when entering or tabbing through the taborder
Example:
[lastname]
[forename]
[secondname]
[password]
[role]
for skipping the field i use this code in the itemfocuschanged()-event
itemfocuschanged(row, dwo, data):
choose case dwo.name
case "forename"
this.post event ue_setcolumn("password") // posted to avoid infinite loops (see itemfocuschanged help)
end choose
ue_setcolumn(as_column):
this.SetColumn(as_column)
After leaving column [forename] ...
...in PB 12.1:
Focus is on [password], if not protected
Focus is on [role], if [password] is protected
Conclusion: Setcolumn() automatically sets the next editable column in the taborder, if the colum is protected.
...in PB 2017 R2:
Focus is on [password], if not protected
Focus is "lost", if [password] is protected
Conclusion: Setcolumn() DOES NOT automatically set the next editable column. A getcolumn() after the Setcolumn() returns 0.
The returnvalue of Setcolumn() is always 1.
Has anybody experienced this issue?
Regards, Martin
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.