FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Forma del cusror en GETS
Posts: 418
Joined: Wed Nov 26, 2008 06:33 PM
Forma del cusror en GETS
Posted: Tue May 19, 2015 09:55 PM

Saludotes.

Una ayuda.

¿Como puedo cambiar el aspecto del cursor en la edicion de los GETS?

el normal pues es la rayita titilante, y cuando oprimimos INSERT cambia un titilante de màs longitud.

desde programa que podre hacer para cambiar el aspecto, ya que hay varias personas que por inmensa falta de vision se les complica identificar en donde estan dentro del get
auque al get le cambio el color cada vez que este recibe el foco, pero no es suficiente.

Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
Posts: 346
Joined: Mon Oct 05, 2009 03:35 PM
Re: Forma del cusror en GETS
Posted: Wed May 20, 2015 12:11 PM
hola, una idea

viendo la clase tget se ve que cuando pasas el mouse por el control, este cambia según lo definamos en ::oCursor, pero si no esta definido, este asume un cursor de "Rayita" en la función CursorIBeam()

Code (fw): Select all Collapse
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TGet

   if ::lDrag
      return ::Super:MouseMove( nRow, nCol, nKeyFlags )
   else
      ::oWnd:SetMsg( ::cMsg )        // Many thanks to HMP
      if ::oCursor != nil
         SetCursor( ::oCursor:hCursor )
      else
         CursorIBeam()
      endif
      ::CheckToolTip()

      if ::bMMoved != nil
         return Eval( ::bMMoved, nRow, nCol, nKeyFlags )
      endif
      if ::oBtn != nil
         ::oBtn:Refresh()
      endif
   endif

return nil      // We want standard Get behavior !!!


intenta hacer un efecto para que puedas dar solución a tu disyuntiva.

saludos
SkyPe: armando.lagunas@hotmail.com

Mail: armando.lagunas@gmail.com
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Forma del cusror en GETS
Posted: Wed May 20, 2015 05:39 PM
Code (fw): Select all Collapse
   Set( _SET_INSERT, ! Set( _SET_INSERT ) )
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Forma del cusror en GETS
Posted: Wed May 20, 2015 05:43 PM
Code (fw): Select all Collapse
    DEFINE CURSOR oHand RESOURCE "Dedo"

    DEFINE Dia...

    REDEFINE GET aGet[1] VAR XRAZMATRIC PICTURE "@K!" ID 20 OF oDlg ;
             FONT oFont UPDATE COLOR CLR_HRED, CLR_HCYAN            ;
             CURSOR oHand


João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Forma del cusror en GETS
Posted: Wed May 20, 2015 07:02 PM

João Santos

It appears that I am asking the same question in the English forums ..

viewtopic.php?f=3t=30670

I was hoping for a global Cursor setting to allow Set Insert to be activated, but not have the large Cursor .. setting the cursor for each Get is almost impracticable :cry:

Rick Lipkin

&

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Forma del cusror en GETS
Posted: Wed May 20, 2015 07:43 PM
Rick,

Code (fw): Select all Collapse
// testget3.prg Model.

#include "fivewin.ch"

function main()

   FromCode()

   //FromrES()
 
return Nil

Function FromCode()

   local oDlg
   local oGet1, oGet2, oGet3, oGet4
   local cVar1, cVar2, cVar3, cVar4, oHand
   local lActive := .f.
   
   cVar1 := 0
   cVar2 := 0
   cVar3 := 0
   cVar4 := 0

   DEFINE CURSOR oHand HAND
   
   define dialog oDlg title "From Code" pixel size 300,300

   Set( _SET_INSERT, ! Set( _SET_INSERT ) )

   @ 10,10 get oGet1 var cVar1 bitmap "..\bitmaps\on.bmp" ;
           action( msginfo( "With Transparent" ) ) of oDlg pixel size 60,12 ;
           CURSOR  oHand

   @ 40,10 get oGet2 var cVar2 bitmap "..\bitmaps\on.bmp" ;
           action( msginfo( "Without Transparent" ) ) of oDlg pixel size 60,12 ;
           CURSOR  oHand

   @ 70,10 get oGet3 var cVar3 bitmap "..\bitmaps\chkyes.bmp" ;
           action( msginfo( "With Adjust-Transparent" ) ) of oDlg pixel size 120,12 ;
           CURSOR  oHand

   @ 100,10 get oGet4 var cVar4 bitmap "..\bitmaps\chkyes.bmp" ;
   action( if( lActive,oGet3:disable(),oGet3:enable()),        ;
              lActive:= !lActive, oDlg:update() ) of oDlg pixel size 120,12 ;
              CURSOR  oHand
   
   oGet1:lBtnTransparent := .t.       // transparent button get oGet1
   
   oGet3:disable()
   oGet3:lBtnTransparent := .t.       // transparent button get oGet3
   oGet3:lAdjustBtn      := .t.       // Button Get Adjust Witdh oGet3
   oGet3:lDisColors      := .f.       // Deactive disable color
   oGet3:nClrTextDis     := CLR_WHITE // Color text disable status
   oGet3:nClrPaneDis     := CLR_BLUE  // Color Pane disable status
   
   oGet4:lAdjustBtn      := .t.
   
   activate dialog oDlg centered

   Set( _SET_INSERT, ! Set( _SET_INSERT ) )
 
return nil
   
Function FromRes()

   local oDlg
   local oGet1, oGet2, oGet3, oGet4
   local cVar1, cVar2, cVar3, cVar4, oHand
   local lActive := .f.
   
   cVar1 := 0
   cVar2 := 0
   cVar3 := 0
   cVar4 := 0

   DEFINE CURSOR oHand RESOURCE "Dedo"
   
   define dialog oDlg resource "fromres"

   Set( _SET_INSERT, ! Set( _SET_INSERT ) )

   redefine get oGet1 var cVar1 id 100 bitmap "on" ;
            action( msginfo( "With Transparent" ) ) of oDlg ;
            CURSOR  oHand

   redefine get oGet2 var cVar2 id 101 bitmap "on" ;
            action( msginfo( "Without Transparent" ) ) of oDlg ;
            CURSOR  oHand

   redefine get oGet3 var cVar3 id 102 bitmap "chkyes"     ;
            action( msginfo( "With Adjust-Transparent" ) ) ;
            COLOR CLR_BLACK, CLR_CYAN of oDlg              ;
            CURSOR  oHand

   redefine get oGet4 var cVar4 id 103 bitmap "chkyes"     ;
            action( if( lActive,oGet3:disable(),oGet3:enable()),    ;
                        lActive:= !lActive, oDlg:update() ) of oDlg ;
            CURSOR  oHand
   
   oGet1:lBtnTransparent := .t.       // transparent button get oGet1
   
   oGet3:disable()
   oGet3:lBtnTransparent := .t.       // transparent button get oGet3
   oGet3:lAdjustBtn      := .t.       // Button Get Adjust Witdh oGet3
   oGet3:lDisColors      := .f.       // Deactive disable color
   oGet3:nClrTextDis     := CLR_WHITE // Color text disable status
   oGet3:nClrPaneDis     := CLR_BLUE  // Color Pane disable status

   
   oGet4:lAdjustBtn := .t.
   
   activate dialog oDlg centered

   Set( _SET_INSERT, ! Set( _SET_INSERT ) )
 
return nil
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Forma del cusror en GETS
Posted: Thu May 21, 2015 01:01 AM
noe aburto wrote:Saludotes.

Una ayuda.

¿Como puedo cambiar el aspecto del cursor en la edicion de los GETS?

el normal pues es la rayita titilante, y cuando oprimimos INSERT cambia un titilante de màs longitud.

desde programa que podre hacer para cambiar el aspecto, ya que hay varias personas que por inmensa falta de vision se les complica identificar en donde estan dentro del get
auque al get le cambio el color cada vez que este recibe el foco, pero no es suficiente.


Search for "CreateCaret(" in tget.prg. Change the values as you like.
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Forma del cusror en GETS
Posted: Thu May 21, 2015 01:01 AM
Rick Lipkin wrote:João Santos

It appears that I am asking the same question in the English forums ..
viewtopic.php?f=3&t=30670

I was hoping for a global Cursor setting to allow Set Insert to be activated, but not have the large Cursor .. setting the cursor for each Get is almost impracticable :-)

Rick Lipkin


One global setting for you:
TGet():lChangeCaret := .f.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion