1. Mark Jones
  2. PowerBuilder
  3. Friday, 31 March 2023 14:02 PM UTC

At some point in the past, Powerbuilder added support for tab order form non-column objects on a datawindow.   However I do not see a way using code to setfocus on one of these objects.   

Is there a method that I have not discovered?

Is there some way you can pass an object into setfocus? 

e.g. i_dw_results.object.c_status.setfocus() - FYI this gives me a runtime error

Thanks,

     Mark

Mark Jones Accepted Answer Pending Moderation
  1. Monday, 17 April 2023 16:22 PM UTC
  2. PowerBuilder
  3. # 1

I have added this as an enhancement request

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 1 April 2023 01:59 AM UTC
  2. PowerBuilder
  3. # 2

Hi Mark,

I've been using PB since 1993 but I don't remember any such thing. (might have escaped me).

As far as I know, you can only "set focus" to a column by using the SetColumn() command.

SetFocus() is for the controls, but not for anything in them.

Maybe you're right, but that would really surprise me.

best regards.

Comment
  1. Mark Jones
  2. Wednesday, 5 April 2023 20:09 PM UTC
Thanks Chris. What brought this up for us is that if you use protect expressions to stop a user modifying a column you also stop the user setting focus on that column. This can cause problems when switching rows programmatically if the current column is protected for the row you are switching to. Basically Appeon need to add the equivalent of edit.displayonly that is conditional. That way you can put focus on a field but not modify.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 5 April 2023 21:20 PM UTC
Hi Mark. That is a good enhancement suggestion IMHO. Please open up a support ticket for this as an enhancement request. Thanks!
  1. Helpful 1
  1. Roland Smith
  2. Monday, 17 April 2023 16:49 PM UTC
If you set 'Display Only' to true instead of Protect, you can still tab into the column so SetColumn should work.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.