Read-only browse

Alextrs

New Member
Hello,
I try to change READ-ONLY status of BROWSE online. I define browse:
Code:
[LEFT]DEFINE BROWSE BProperty QUERY QProperty DISPLAY
ttblObjects_prp.PropertyID           FORMAT ">>9"
ttblObjects_prp.PropertyName      FORMAT "x(25)"
ttblObjects_prp_val.PropertyValue FORMAT "x(8)"
ENABLE ttblObjects_prp_val.PropertyValue [/LEFT]
[SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]WITH [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]SIZE [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]45 [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]BY [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]5 [/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]TITLE[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"Object Properties"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]. [/SIZE]
then before show browse in frame I set READ-ONLY property for it:
Code:
BProperty:READ-ONLY = TRUE
when user press INS button I change status READY-ONLY to FALSE:
Code:
[LEFT]vhBProperty:SENSITIVE = FALSE.
BProperty:READ-ONLY IN FRAME FRAME-1 = FALSE.
vhBProperty:SENSITIVE = TRUE.
IF vhBProperty:NUM-SELECTED-ROWS = 0 THEN DO:
  APPLY "END" TO vhBProperty.
  vhBProperty:SELECT-FOCUSED-ROW().
END.
vhBProperty:INSERT-ROW ("AFTER"). [/LEFT]
After user created new record, I want to save changes and change browse READ-ONLY status to TRUE:
Code:
[LEFT]ON "ROW-LEAVE" OF BROWSE BProperty DO:
     ...[/LEFT]
      BProperty:READ-ONLY IN FRAME FRAME-1 = TRUE.
[LEFT]END.[/LEFT]
but after this I get this message:
Code:
You cannot change the READ-ONLY attribute for BROWSE BProperty while that browser has focus. (4517)
How I can solve this problem? :(
 
Greetings,

Simply do as Progress is asking.
Move focus to a different widget, then assign the values for the browse widget. In your block, a later procedure assign the Browse attributes. Thus moving focus away from the browse. Eg if you have other wigets on screen at the same time, use their trigger blocks. Or execute a procedure to do this.
 
Back
Top