Forma del cusror en GETS

Forma del cusror en GETS

Postby noe aburto » Tue May 19, 2015 9: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
User avatar
noe aburto
 
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Forma del cusror en GETS

Postby armando.lagunas » 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: Select all  Expand view

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
User avatar
armando.lagunas
 
Posts: 346
Joined: Mon Oct 05, 2009 3:35 pm
Location: Curico-Chile

Re: Forma del cusror en GETS

Postby karinha » Wed May 20, 2015 5:39 pm

Code: Select all  Expand view

   Set( _SET_INSERT, ! Set( _SET_INSERT ) )
 
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7213
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Forma del cusror en GETS

Postby karinha » Wed May 20, 2015 5:43 pm

Code: Select all  Expand view

    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
User avatar
karinha
 
Posts: 7213
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Forma del cusror en GETS

Postby Rick Lipkin » Wed May 20, 2015 7:02 pm

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 :cry:

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2615
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Forma del cusror en GETS

Postby karinha » Wed May 20, 2015 7:43 pm

Rick,

Code: Select all  Expand view

// 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
User avatar
karinha
 
Posts: 7213
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Forma del cusror en GETS

Postby nageswaragunupudi » Thu May 21, 2015 1: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
User avatar
nageswaragunupudi
 
Posts: 10247
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Forma del cusror en GETS

Postby nageswaragunupudi » Thu May 21, 2015 1: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 :cry:

Rick Lipkin


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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10247
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 63 guests