1. Kari Paukku
  2. PowerBuilder
  3. Sunday, 12 February 2023 09:42 AM UTC

Hi,

How can one dynamically create a row indicator (a simple * will do) to a grid data window?

Attached is a pdf that shows what I'm after. In the sample dw, I created a computed column with the following code

IF ( currentRow() = getrow(),'*','')

How can I achieve this dynamically?

 Thanks,

Kari

 

 

 

Attachments (1)
Accepted Answer
Raja RAMASAMY Accepted Answer Pending Moderation
  1. Friday, 24 February 2023 02:39 AM UTC
  2. PowerBuilder
  3. # Permalink

Hi

I show a toggle image (if document found, then show red indicator; otherwise black indicator). Not sure if this works for you.

bitmap( if( document_flag = -1, if( mod( getrow( ), 2) = 0, 'light_off_row1.bmp', 'light_off_row2.bmp'), if( mod( getrow( ), 2) = 0, 'light_on_row1.bmp', 'light_on_row2.bmp')))

Raja

 

Comment
There are no comments made yet.
Kari Paukku Accepted Answer Pending Moderation
  1. Sunday, 12 February 2023 19:32 PM UTC
  2. PowerBuilder
  3. # 1

Thank you so much, although this makes me wonder what I have been doing all these years :).

I started using PB version 3 or 4, I can't even remember, after visiting an event (Oracle Word?) in the USA, in the early to mid 1990's.
If I knew about SetRowFocusIndicator, I had forgotten it all - this appears to be an occurring theme in this reply.

Anyway, the SetRowFocusIndicator(FocusRect!) worked best for me and achieved my goal. Below is a small screenshot of a code dw, where the user can add a code and a color for the code. Highlighting the selected row had the problem that it obscured the color. Now that is solved.

When now I have the opportunity, two follow-up questions: 

  1. Is there a way to make the rectangle more visible, e.g. bold, different color or similar?
  2. I have some dw's where it would be to have the scroll bar on the left side of the dw. Is that possible?

 Thanks,

Kari

Comment
  1. Chris Pollach @Appeon
  2. Sunday, 12 February 2023 20:24 PM UTC
PS: you also have a separate Vertical Scrollbar object. So turning off scrolling in a DW Control or Window - then using PB's VSB control on the left hand side would achieve the same effect your looking for. ;-)
  1. Helpful
  1. Kari Paukku
  2. Sunday, 12 February 2023 20:43 PM UTC
With "border," I meant the rectangle to be a little more visible, a solid line or such. But it is fine; no need to do any tricks if it works this well out of the box.



What comes the scroll bars after searching the web and reading the documentation, etc. I arrived at a similar conclusion - the O/S decides the scroll bar position. All the options to change it change the whole system for left-handed users, and I would need this only in a few very wide dw's.



I started to reminisce about the old days, and somehow can recall that the PowerSoft presentation (by the CEO at the time?) caused Oracle Forms to be dropped at my company and replaced by PB.



Kari



Ps. While writing this, I noticed that you did come up with the idea of using the VSB control. I don't think I ever used it – go figure – but it sounds good, and I will explore that route.

  1. Helpful
  1. Chris Pollach @Appeon
  2. Sunday, 12 February 2023 21:02 PM UTC
Newer PB versions use a finer border to comply with the newer W10 / W11 UI. You would need to draw your own rectangle object around the area to improve the thickness. Too much work IMHO for a small gain.

Yes at that Oracle forms timeframe it could have been either Dave Litwack or Michel Kertzman doing the presentation. ;-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Sunday, 12 February 2023 15:15 PM UTC
  2. PowerBuilder
  3. # 2

Hi Kari;

   For that type of UI, I use an SQL computed column.

    Also, I like the SetRowFocusIndicator() command ...

https://docs.appeon.com/pb2019/datawindow_reference/ch06s20.html

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.