1. Shweta Jain
  2. PowerBuilder
  3. Tuesday, 12 March 2019 06:20 AM UTC

 

Hello ,

I have one datawindow with 10th columns (field1, field2,……… , field10). Tab order is already set in datawindow from 10 to 100.

Requirement:  If focus is on field10 and user pressed on tab then tab should be set as below condition.

  1. If field1 have more than one value then tab should be set on field1.
  2. If field1 one value then tab should be set on field2.

Sample Code on user created keydown event on datawindow(dw_1):

if ( keydown(KeyTab!)) and (this.GetColumnName() = ‘field10') then

   If  filed1.RowCount () > 1 Then

     dw_1.SetColumn(' field1')

   Else

     dw_1.SetColumn('field2')

  End If   

end if

 

 

 

This code is not working fine.

Please advise how can i set the tab position as per desired requirement.

 

Thanks

Shweta

Shweta Jain Accepted Answer Pending Moderation
  1. Friday, 15 March 2019 07:25 AM UTC
  2. PowerBuilder
  3. # 1

Hi,

I am not able to find "pbm_key" event id in powerbuilder 17.

In powerbuilder 17 only i can see these (pbm_keydown ,pbm_keyup,pbm_dwnkey)event ids.

 

Thanks,

Shweta

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 12 March 2019 16:08 PM UTC
  2. PowerBuilder
  3. # 2

Hi Shweta;

  This code should work OK but needs to be attached to the DataWindow Control's "pbm_dwnkey" event. To do this, create a User Event (ie "oe_key") and map this to the "pbm_dwmkey" Event ID.

  The "pbm_dwnkey" approach works nicely for me using your code.

HTH

Regards .. Chris

Comment
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.