resize smartdatabrowser problem

rickm

New Member
I am having a problem resizing the smartdatabrowser once its placed inside my smartwindow. I can always select the browse and stretch it to make it bigger, but i can never resize it to make it smaller. Has anyone else come across this and found a solution?
 

michaelcarroll

New Member
Resizing a smartbrowser

I know it's been a while, but I'll post a response to this anyway.

At design-time, when your smartbrowser is visible in the smartwindow or smartdialog, and you can see resize 'handles', what you are actually resizing is the frame that parents the browse widget, and not the browse widget itself.

Now when you grab the resize handles and try to make the frame smaller, Progress will not allow you to make the frame smaller than its contents (e.g. the browse widget itself).

To get this to work, there are two options:

1) You must make the frame scrollable at design-time
or
2) You hide the contents of the frame during a resize

Personally, I prefer option 2 because you don't have to worry about resetting virtual sizes to get rid of the inevitable scrollbars. Although a disadvantage is that you can't see the object that you are resizing.

To get option 2 working, add the following code to the smartbrowser:

ON START-RESIZE OF {&FRAME-NAME}
DO:
ASSIGN SELF:HIDDEN = TRUE.
END.

Then, the very last thing within your 'resizeObject' procedure, unhide the frame.

ASSIGN FRAME {&FRAME-NAME}:HIDDEN = FALSE.

To use option 1, you will need to make the browse widget's parent frame scrollable, and be sure to reset its virtual sizes to match the physical sizes, at the end of the 'resizeObject' procedure.
 
Top