Consultor Eletrônico



Kbase P188744: Combo box in browse cell increases browse line height
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/05/2011
Status: Unverified

SYMPTOM(s):

Combo box in browse cell increases browse line height

Adding a combo box to a browser changes the browse row height.

The row height is smaller if the field is not added as a combo box.

The combo reduces the number of rows the browse displays in the viewport.

The following code will reproduce the problem:


DEFINE VARIABLE b1 AS HANDLE.
DEFINE VARIABLE bcol AS HANDLE NO-UNDO.

DEFINE QUERY q1 FOR customer
FIELDS (custnum name salesRep) SCROLLING.

OPEN QUERY q1 FOR EACH customer NO-LOCK.
DEFINE FRAME f1
WITH SIZE 78 BY 18.

CREATE BROWSE b1
ASSIGN
FRAME = FRAME f1:HANDLE
X = 2
Y = 2
WIDTH = 76
DOWN = 8
QUERY = QUERY q1:HANDLE
TITLE = "Dynamic Browse with static query"
SENSITIVE = TRUE
VISIBLE = FALSE
MULTIPLE = TRUE
READ-ONLY = FALSE
SEPARATORS = TRUE.

b1:ADD-LIKE-COLUMN("customer.custnum").
b1:ADD-LIKE-COLUMN("customer.name").
/* bcol = b1:ADD-LIKE-COLUMN("customer.salesrep"). */
/* bcol:READ-ONLY = FALSE. */
bcol = b1:ADD-LIKE-COLUMN("customer.salesrep",0,'COMBO-BOX').
bcol:LIST-ITEMS = "HXM,DKP,SLS,JAL,RDR,DOS,GPE,KIK,BBB".
bcol:READ-ONLY = FALSE.
b1:VISIBLE = TRUE.
ENABLE ALL WITH FRAME f1.
WAIT-FOR CLOSE OF CURRENT-WINDOW


FACT(s) (Environment):

Windows
OpenEdge 10.x

CAUSE:

Bug# OE00208092

FIX:

None at this time.

As a workaround, set the browse row height to a value saved before the combo box is added to the browse. For example:


b1:ADD-LIKE-COLUMN("customer.custnum").
b1:ADD-LIKE-COLUMN("customer.name").
b1:VISIBLE = TRUE. /* MOVED BEFORE ADD-LIKE-COLUMN("customer.salesrep",0,'COMBO-BOX') */

def var hght as int. /* SAVE ROW HEIGHT */
hght = b1:row-height-pixels.
bcol = b1:ADD-LIKE-COLUMN("customer.salesrep",0,'COMBO-BOX').
bcol:LIST-ITEMS = "HXM,DKP,SLS,JAL,RDR,DOS,GPE,KIK,BBB".
bcol:READ-ONLY = FALSE.
b1:row-height-pixels = hght. /* RESTORE ROW HEIGHT */
ENABLE ALL WITH FRAME f1.