resizing window and image control
Posted: Sat Jun 16, 2018 5:48 pm
Hello,
I have a function that shows a bigger image in a window. With the older libs (date 23-03-2018) it worked fine when I use the next code:
That gives the next result:
With the newest lib this gives another result:
If I look in the source of Windows.prg there si something strnage too?
As you can see METHOD ChangeSize and SetSize first have Height and than Width, While SetSize works with Width and than Height.
Is this as it is ment to be?
I have a function that shows a bigger image in a window. With the older libs (date 23-03-2018) it worked fine when I use the next code:
Code: Select all
FUNCTION RK_FotoGroot(cFoto)
*to show a big picture
LOCAL oWndFoto, oBtnZoom
LOCAL oFoto
LOCAL nWidth := 0
LOCAL nHeight := 0
LOCAL nFotoWidth
LOCAL nFotoHeight
DEFINE DIALOG oWndFoto TITLE 'grote foto' ;
FROM 0, 0 TO 800, 800
@ 40, 10 IMAGE oFoto FILENAME cFoto OF oWndFoto SIZE 1000, 1000
nFotoWidth := oFoto:GetWidth()
nFotoHeight := oFoto:GetHeight()
oFoto:SetSize( nFotoWidth, nFotoHeight )
oFoto:SetScaling( 1 )
oWndFoto:SetSize( nFotoWidth + 20, nFotoHeight + 40 )
@ 10, 10 BUTTON oBtnZoom PROMPT 'Ok' OF oWndFoto ACTION oWndFoto:End()
oBtnZoom:SetPos( 5, oWndFoto:nWidth / 2 - oBtnZoom:nWidth / 2 )
ACTIVATE DIALOG oWndFoto
RETURN NIL
With the newest lib this gives another result:
If I look in the source of Windows.prg there si something strnage too?
Code: Select all
METHOD ChangeSize(nNewHeight, nNewWidth) INLINE WinSizeChange(::hWnd, nNewHeight, nNewWidth )
METHOD SetSize( nWidth, nHeight ) INLINE WinSetSize( ::hWnd, nWidth, nHeight )
METHOD SetSizeChange(nNewHeight, nNewWidth ) INLINE WinSetSizeChange(::hWnd, nNewHeight, nNewWidth )
Is this as it is ment to be?