" />

  1. Daniel Ferrreira
  2. PowerBuilder
  3. Thursday, 9 February 2023 14:43 PM UTC

Hi guys,

I have a multi-line dw, and I've created up and down buttons so that the customer can sort the sizes as he sees fit. The thing is that the button seems to have its own focus. In the example below, I clicked the "XG" move up button, and I moved the row up (using rowsMove). The thing is that the button remained with focus, but on the same row. I wanted the focus to move with the row. I tried with setRow and scrollToRow, the row focus moved, but seems like a button has its own focus and remained. Please se pic below, it's clearer to explain.

The behavior I'd like, it its possible, is that the button focus moved up, as not to confuse our customers.

The below image is the original data. Notice that it has no visible focus and the "G" is before the "XG".

 

This is what happens after I click the "up" button on the "XG" row. The row moves up, but the button I clicked remains with focus on the same clicked row. I'm not being able to move the button focus to the correct row.

In time: If I don't use setRow, the same behavior happens, but the selected row remains on the not visible row number 1.

Accepted Answer
John Fauss Accepted Answer Pending Moderation
  1. Friday, 10 February 2023 02:23 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi, Daniel - 

Your question intrigued me, so this evening I experimented and came up with a possible solution for you to consider.

The attached sample app looks like this:

If I click on row 5's "up" arrow:

The "down" arrows operate in a similar manner. The "buttons" are actually Text DWObjects using the Wingdings 3 font, with the "Show Focus Rectangle" property checked/enabled.

Hopefully, this will help you find a solution that is to your liking.

Best regards, John

Attachments (1)
Comment
  1. Daniel Ferrreira
  2. Friday, 10 February 2023 13:28 PM UTC
Thanks a lot, John! That will do nicely!
  1. Helpful
There are no comments made yet.
Daniel Ferrreira Accepted Answer Pending Moderation
  1. Thursday, 9 February 2023 16:16 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chris!

I did this test now, but I was in doubt what the DC.setFocus() would be. I replaced it with dw_1.SetFocus(), but nothing changed in the aftermath.

 

Comment
  1. Miguel Leeuwe
  2. Friday, 10 February 2023 00:22 AM UTC
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 10 February 2023 01:00 AM UTC
That Chris guy is always finding PB runtime stuff with his STD Framework testing. LOL! ;-)
  1. Helpful
  1. Daniel Ferrreira
  2. Friday, 10 February 2023 13:30 PM UTC
lol, awesome!!!
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 9 February 2023 15:51 PM UTC
  2. PowerBuilder
  3. # 2

Hi Daniel;

  After the setRow and scrollToRow operation, have you tried ...

  • Window.SetFocus()
  • Yield()
  • DC.SetFocus()

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.