Browse: Capture horizontal scroll before Progress does

jongpau

Member
Hi Y'all,

I am trying to display some markers on the labels of browse columns to indicate that the data is sorted on a column (ascending or descending) - a-la Outlook etc.

I have managed to do all this and to move the "icons" when the columns are resized, moved or when the user scrolls horizontally.

To capture the horizontal scroll I use the SCROLL-NOTIFY event (as far as I know there is no other way).
However: when the user scrolls horizontally the icons stay where the column used to be, until the user releases the mouse button. This because the SCROLL-NOTIFY event does not fire until the user releases the mouse button (standard - sometimes annoying - Progress behaviour).

So here's the question: How can I capture the horizontal scroll in a browse before Progress does (call it a "START-SCROLL")? This so I can hide, or even better move, the icons during or before Progress' standard column scrolling (which should of course still happen).

I hope one of the geniusses out there can help me.
 
I went down a different route and set the label background colour attribute (hColumn:LABEL-BGCOLOR) of the appropriate column to either green (ascending) or red(descending).

Alternatively, you could prefix the column label with "v" or "^". It doesn't look spectacular, but it's a lot simpler.

Because the property is set for the widget, it doesn't matter where you move it on the screen.
 

jongpau

Member
Hi Norman,

Thanks for the idea. I have made some changes so the users can choose whether they want to see the "icons" or use colours.

Although this (sort of) fixes my problem, I'd still be interested if anyone has any ideas on how to capture the horizontal scroll :)
 

pako

New Member
Column Name

Hii !! jongpau.

I hope you can help me, i have a browse, but when i press the star-search event, i need to know the column name o column label in for the column in that moment, i just need to sort then data by select column.

Thanks in advanced.
 

jongpau

Member
Column Name

Hello there Pako,

Ty something like this:
Code:
DEF VAR lhColumn AS HANDLE NO-UNDO.

ON "START-SEARCH":U OF BROWSE {&BROWSE-NAME} DO:
  lhColumn = BROWSE {&BROWSE-NAME}:CURRENT-COLUMN.

  MESSAGE lhColumn:NAME lhColumn:LABEL
          VIEW-AS ALERT-BOX.
END.
If you have Progress v9.x you can use the column-name and a dynamic query to sort the browse on the selected column.

In earlier version(s) of Progress you will have to create some sort of CASE statement (using the column name) that opens the browse's query with the required sorting.

If you need more help let me know :)

HTH.
 
Top