problem with spinner get

problem with spinner get

Postby Silvio.Falconi » Sat Jun 25, 2016 8:01 am

I have this

REDEFINE GET ::oRight VAR ::nRight ID 102 OF oDlg ;
PICTURE "9.9 cm " UPDATE ;
SPINNER ON UP ( 0.1 ) ON DOWN ( 0.1 ) MIN 0 MAX 5


why it not run ? I can press the spinner but it not move the value why ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: problem with spinner get

Postby Antonio Linares » Sat Jun 25, 2016 9:37 pm

Silvio,

Try this:

REDEFINE GET ::oRight VAR ::nRight ID 102 OF oDlg ;
PICTURE "9.9 cm " UPDATE ;
SPINNER ON UP ::nRight += 0.1 ON DOWN ::nRight -= 0.1 MIN 0 MAX 5
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: problem with spinner get

Postby Silvio.Falconi » Tue Jun 28, 2016 7:52 am

Antonio,
not run ok
I can press only once the it not run
this is all dialog
Code: Select all  Expand view


LOCAL aIndent := ::WndChild():GetIndent()
   LOCAL lOk     := .F.
   LOCAL oDlg
   Local nTab    :=  ::WndChild():GetTabStop()


   ::nLeft  := nLeft  := aIndent[ 1 ]
   ::nRight := nRight := aIndent[ 2 ]
   ::nFirst := nFirst := aIndent[ 3 ]
   ::nTab   := nTab

   ::nAlign := nAlign := ::WndChild():GetAlign()

DEFINE DIALOG oDlg RESOURCE "Paragraph" FONT ::oFont

   REDEFINE GET ::oLeft VAR ::nLeft ID 101 OF oDlg ;
            PICTURE "9.9 cm " UPDATE ;
            SPINNER ON UP ( 0.1 ) ON DOWN ( 0.1 ) MIN 0 MAX 5

    REDEFINE GET ::oRight VAR ::nRight ID 102 OF oDlg ;
PICTURE "9.9 cm " UPDATE ;
SPINNER ON UP ::nRight += 0.1 ON DOWN ::nRight -= 0.1 MIN 0 MAX 5

   REDEFINE GET ::oFirst VAR ::nFirst ID 103 OF oDlg ;
            PICTURE "99.9 cm " UPDATE ;
            SPINNER ON UP ( 0.1 ) ON DOWN ( 0.1 ) MIN -5 MAX 5

   REDEFINE GET ::oTab VAR ::nTab ID 104 OF oDlg ;
            PICTURE "9.99 cm " UPDATE ;
            SPINNER ON UP ( 0.01 ) ON DOWN ( 0.01 ) MIN 0 MAX 5

   REDEFINE COMBOBOX ::oAlign VAR ::nAlign ITEMS ::aAlign ID 105 OF oDlg

   REDEFINE BUTTON ID 201 ACTION ( lOk := .T., oDlg:End() )
   REDEFINE BUTTON ID 202 ACTION ( oDlg:End() )

   ACTIVATE DIALOG oDlg CENTER




the rc
Code: Select all  Expand view
PARAGRAPH DIALOG 34, 96, 208, 126
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Párrafo"
FONT 8, "MS Sans Serif"
{
 GROUPBOX "&Sangría", -1, 10, 10, 116, 71, BS_GROUPBOX | WS_GROUP
 LTEXT "I&zquierda:", -1, 21, 23, 45, 9
 EDITTEXT 101, 70, 21, 45, 13, ES_RIGHT | WS_BORDER | WS_VSCROLL | WS_TABSTOP
 LTEXT "&Derecha:", -1, 21, 43, 45, 9
 EDITTEXT 102, 70, 41, 45, 13, ES_RIGHT | WS_BORDER | WS_VSCROLL | WS_TABSTOP
 LTEXT "&Primera línea:", -1, 21, 63, 45, 9
 EDITTEXT 103, 70, 61, 45, 13, ES_RIGHT | WS_BORDER | WS_VSCROLL | WS_TABSTOP
 GROUPBOX "&Tabulaciones", -1, 10, 87, 116, 29, BS_GROUPBOX | WS_GROUP
 LTEXT "&Espacio:", -1, 21, 99, 45, 9
 EDITTEXT 104, 70, 97, 45, 13, ES_RIGHT | WS_BORDER | WS_VSCROLL | WS_TABSTOP
 GROUPBOX "A&lineación:", -1, 136, 87, 62, 29, BS_GROUPBOX | WS_GROUP
 COMBOBOX 105, 142, 97, 50, 50, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
 DEFPUSHBUTTON "&Aceptar", 201, 136, 14, 62, 15
 PUSHBUTTON "&Cancelar", 202, 136, 36, 62, 15
}
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: problem with spinner get

Postby Antonio Linares » Tue Jun 28, 2016 5:51 pm

Silvio,

Here you have a working example:

Code: Select all  Expand view
#include "Fivewin.ch"

FUNCTION MAIN()

    LOCAL oDlg, oGet

    LOCAL nVal := -1

    DEFINE DIALOG oDlg

    @ 1,1 GET oGet VAR nVal;
          PICTURE "999.9";
          SPINNER ON UP ( nVal += 0.1, oGet:Refresh() ) ;
                  ON DOWN ( nVal -= 0.1, oGet:Refresh() )

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42094
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 80 guests