FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to Disable TXIMAGE:MouseWheel to resize image? *Solved*
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
How to Disable TXIMAGE:MouseWheel to resize image? *Solved*
Posted: Sat Sep 16, 2017 03:54 PM

I need to fix size of TXIMAGE. How do I disable Zoom In/Out by MouseWheel?

Thanks in advance.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sat Sep 16, 2017 07:58 PM
Dear Dutch
Add at method MouseWheel of class TXImage

Code (fw): Select all Collapse
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 (fw): Select all Collapse
   oImage:bMouseWheel := { || .T. }
   //oImage:bRClicked := { || .T. }     // Also for disable button right mouse
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sat Sep 16, 2017 08:49 PM

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.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sun Sep 17, 2017 01:24 AM
Dear Mr.Rao,

I used BITMAP for many year but when I move BMP file to MySQL field (Mediumblob). I saw the TIMAGE has support it.
Which class that does support image from field instead of TXIMAGE?

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.
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sun Sep 17, 2017 03:06 AM

By default, the user can pan, zoom and rotate the image with mouse or by touch.
FWH 17.08 onwards you can disable this by setting oImage:nUserControl := 0
So please wait for a day or two.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sun Sep 17, 2017 04:53 AM

Dear Mr.Rao,

Thank you so much. I would be better, if you can make TIMAGE or BITMAP to support IMAGE from FIELD.

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: How to Disable TXIMAGE:MouseWheel to resize image?
Posted: Sun Sep 17, 2017 04:54 AM
Dear Navarro,

Thanks once again for your help.
cnavarro wrote:Dear Dutch
Add at method MouseWheel of class TXImage

Code (fw): Select all Collapse
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 (fw): Select all Collapse
   oImage:bMouseWheel := { || .T. }
   //oImage:bRClicked := { || .T. }     // Also for disable button right mouse
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion