1. John Vanleeuwe
  2. PowerBuilder
  3. Wednesday, 28 August 2019 09:18 AM UTC

HI All,

 

i am going to try my best to explain my problem.

 

I have a datawindow where multiple records are being retrieved. The design ( the heigth) of the datawindow is designed that only one row is visible, but there's a scrollbar to scroll in the datawindow to see the second / third and so on record.

 

Problem : my cursor is on record 1 , i use the scrollbar to scroll to the third row but focus is never being put on this third record. When i use a delete statement combined with the getrow() , it will always delete my first record and not the third.

 

Is there any way i can use setfocus method on the visible record when i use the scrollbar ?

 

I hope this made sense :)

 

 

TIA

John Vanleeuwe

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 28 August 2019 12:04 PM UTC
  2. PowerBuilder
  3. # 1

Explanation:

Initially I did not understand what you meant, because I made the dw with a normal rowheight showing only one row. That way the vertical scrollbar was so small that I could only see the arrows to scroll up and down, but not the middle slider. In that state, when clicking up or down you don't have to do anything, the previous/next row is automatically selected.

But, then I gave the column more height, so that now the slider on the vScrollBar is also visible. When using the slider, indeed you DO have to do something.

 

The little app should solve your problem I think.

(see the 2 coded events on the dw control on the main window).

HIH

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 28 August 2019 11:57 AM UTC
  2. PowerBuilder
  3. # 2

Hi John, 

 

I think I've been able to understand what you mean and solve it.

 

See attached small zipped app.

 

Attachments (1)
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.