Consultor Eletrônico



Kbase P45594: How to highlight the selected browse row seperators?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/1/2003
Status: Unverified

GOAL:

How to highlight the selected row separators in a browse?

FACT(s) (Environment):

Windows

FACT(s) (Environment):

Progress 8.x

FACT(s) (Environment):

Progress 9.x

FIX:

1. Start the User Interface Builder and connect to the sports database.
2. Create a new window.
3. Drop a regular browse widget and populate it with Cust-Num, Name and Balance fields of the customer table. Manually adjust the width of the browse to your liking.
4. Drop two fill-in widgets on the same frame as the browse and use the fill-in property sheet to select NO-LABEL and VIEW-AS TEXT properties.
5. In the main block section of the window insert the following code after the RUN enable_UI statement:

RUN enable_UI.

DEFINE VARIABLE iColor AS INTEGER NO-UNDO INITIAL 10.
ASSIGN
FILL-IN-1:BGCOLOR = iColor
FILL-IN-1:BGCOLOR = iColor
FILL-IN-1:visible = false
FILL-IN-2:BGCOLOR = iColor
FILL-IN-2:BGCOLOR = iColor
FILL-IN-2:visible = false.

7. Insert the following code into the VALUE-CHANGED trigger of the browser:

DO:
DEFINE VARIABLE hFirstCell AS HANDLE NO-UNDO.
ASSIGN
hFirstCell = Customer.Cust-Num:HANDLE IN BROWSE BROWSE-1
FILL-IN-1:X = hFirstCell:X + BROWSE browse-1:X
FILL-IN-1:Y = hFirstCell:Y + BROWSE browse-1:Y
FILL-IN-1:HEIGHT-PIXELS = 1
FILL-IN-1:WIDTH-PIXELS = BROWSE browse-1:WIDTH-PIXELS - 20
FILL-IN-1:VISIBLE = TRUE
FILL-IN-2:X = hFirstCell:X + BROWSE browse-1:X
FILL-IN-2:Y = hFirstCell:Y + BROWSE browse-1:Y + Customer.Cust-Num:HEIGHT-PIXELS
FILL-IN-2:HEIGHT-PIXELS = 1
FILL-IN-2:WIDTH-PIXELS = BROWSE browse-1:WIDTH-PIXELS - 20
FILL-IN-2:VISIBLE = TRUE.
END.
7. Save the window.
8. Run the window.
9. Observe the border lines in the chosen color.