FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how can do get spinner work?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
how can do get spinner work?
Posted: Wed May 04, 2011 08:31 AM

Hi,
myvar1:=date(),myvar2:=2
redefine get myvar1 id 101 of odlg spinner
redefine get myvar2 id 102 of odlg spinner

spinner not work
fwh1104 harbour2.1
TKS!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: how can do get spinner work?
Posted: Wed May 04, 2011 08:37 AM

Please explain better

Marco

Marco Boschi
info@marcoboschi.it
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: how can do get spinner work?
Posted: Wed May 04, 2011 08:47 AM

in rc , id 101,102 all with vscrollbar .

in exe , id 101, you mouse press up arrow either down arrow,not change 2011.05.04 -->2011.05.05 ,2011.05.03
id 102 , then ,fixed to 2, not 3 , 1

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: how can do get spinner work ? and other tget modify
Posted: Thu May 05, 2011 08:10 AM

tget class:

1.METHOD Spinner( bUp, bDown, bMin, bMax ) CLASS TGet
::oVScroll:bGoUp := {|| If( GetFocus() != ::hWnd, ::SetFocus(),),;
Eval( bUp ),::refresh() }
::oVScroll:bGoDown := {|| If( GetFocus() != ::hWnd, ::SetFocus(),),;
Eval( bDown ),::refresh() }
should replace as:

::oVScroll:bGoUp := {|| If( GetFocus() != ::hWnd, ::SetFocus(),),;
Eval( bUp ),::refresh() }
::oVScroll:bGoDown := {|| If( GetFocus() != ::hWnd, ::SetFocus(),),;
Eval( bDown ),::refresh() }

to force bup, bdown work.
redefine myvar id 101 of odlg spinner on up (myvar++) on down (myvar --)

If variable is date type without define bup nor bdown,it always ++ -- year not to day .

  1. method move()
    should add
    IF ::oBtn != Nil
    ::oBtn:Move( 0, ::nWidth() - ::nHeight() - If( ::lSpinner, 20, 0 ),::nHeight() - 4,::nHeight() - 4 )
    endif

  2. method createbutton ()
    ACTION (EVAL( oThis:bAction, oThis ), oThis:SetFocus()) ;

should replaced with

local bwhen := ::bwhen

ACTION (if(empty(bwhen).or.EVAL(bwhen), (EVAL( oThis:bAction, oThis ), oThis:SetFocus()),) ) ;
  1. method keychar()

nKey = Asc( CharUpper( nKey ) )

This changes Chinese word code , should return to pre version

  nKey = Asc( UPPER( Chr( nKey )) )

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion