streching timage control in dialog

streching timage control in dialog

Postby reinaldocrespo » Wed Jan 25, 2006 4:13 pm

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: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby reinaldocrespo » Wed Jan 25, 2006 4:22 pm

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
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby James Bott » Wed Jan 25, 2006 4:40 pm

Reinaldo,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby reinaldocrespo » Wed Jan 25, 2006 4:54 pm

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: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Postby reinaldocrespo » Wed Jan 25, 2006 4:54 pm

and window type popup.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests