I need to fix size of TXIMAGE. How do I disable Zoom In/Out by MouseWheel?
Thanks in advance.
METHOD MouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TXImage
local aPoint := { nYPos, nXPos }
if !Empty( ::bMouseWheel ) .and. ValType( ::bMouseWheel ) = "B"
Eval( ::bMouseWheel, Self )
Return nil
endif
if ::oRect != nil
.../...
oImage:bMouseWheel := { || .T. }
//oImage:bRClicked := { || .T. } // Also for disable button right mouse
nageswaragunupudi wrote:I suggest you use TImage instead of TXImage.
TXImage is intentionally made for giving user full control and therefore till now we did not provide for restricting any user actions.
cnavarro wrote:Dear Dutch
Add at method MouseWheel of class TXImage
- Code: Select all Expand view RUN
METHOD MouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TXImage
local aPoint := { nYPos, nXPos }
if !Empty( ::bMouseWheel ) .and. ValType( ::bMouseWheel ) = "B"
Eval( ::bMouseWheel, Self )
Return nil
endif
if ::oRect != nil
.../...
In your code
- Code: Select all Expand view RUN
oImage:bMouseWheel := { || .T. }
//oImage:bRClicked := { || .T. } // Also for disable button right mouse
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 66 guests