streching timage control in dialog

Post Reply
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

streching timage control in dialog

Post by reinaldocrespo »

Hi.

I have a dialog from resources with a single control in it. It is an timage control:

DEFINE DIALOG oDlg NAME "ViewImage" TITLE "View scanned image dialog window" of oOwner

oImage := tImage():Redefine( 101,, ImgRoot + oLbx:aArrayData[ oLbx:nArrayAt, 5 ], oDlg,,, .t. )

The dialog is resizeable. I'd like for the timage control to resize when ever the container-dialog is resized.

Any ideas?

thank you,


Reinaldo Crespo-Bazán
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

I found this to work:


odlg:bResized := { ||ResizeImage( odlg, oImage ) }

...

Static function ResizeImage( odlg, oImage )
oImage:Move( 0,0, odlg:nWidth(), odlg:nHeight() )
oImage:refresh()
return nil
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

Reinaldo,

I'm curious, how do you make a dialog resizable?

James
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

I suppose that the properties defined on the resource editor.

On this particular dialog I have the following checked:

system menu
thick frame
maximize box
modal frame
visible
User avatar
reinaldocrespo
Posts: 918
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Post by reinaldocrespo »

and window type popup.
Post Reply