FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour streching timage control in dialog
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
streching timage control in dialog
Posted: Wed Jan 25, 2006 04: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

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
streching timage control in dialog
Posted: Wed Jan 25, 2006 04: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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
streching timage control in dialog
Posted: Wed Jan 25, 2006 04:40 PM

Reinaldo,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
streching timage control in dialog
Posted: Wed Jan 25, 2006 04: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

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
streching timage control in dialog
Posted: Wed Jan 25, 2006 04:54 PM

and window type popup.

Continue the discussion