select one button

select one button

Postby Silvio.Falconi » Thu May 05, 2016 8:39 pm

I have a dialog with 7 buttons
each button are a different bitmap ( I tried with btnbmp and rbbbtn with no success)
if I press the first button and the first button must be selected, the other must be no selected
if I press the second button , this second must be selected , the other must be no selected

I tried with :

@ 10,2 RBBTN oNumber7 BITMAP "NONE" SIZE 70,80 OF oFld:aDialogs[2] PIXEL ;
ACTION (oNumber7:lSelected:=TRUE,oNumber1:lSelected:=FALSE,oNumber2:lSelected:=FALSE,;
oNumber3:lSelected:=FALSE,oNumber4:lSelected:=FALSE,oNumber5:lSelected:=FALSE, oNumber6:lSelected:=FALSE,;
lNumber7:=TRUE, lNumber1:=FALSE,lNumber2:=FALSE,lNumber3:=FALSE,lNumber4:=FALSE,;
lNumber5:=FALSE,lNumber6:=FALSE )


the problem
the other are not refresh and then I have all selected, how I resolve ?
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: select one button

Postby Antonio Linares » Thu May 05, 2016 8:50 pm

use WHENs
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: select one button

Postby Silvio.Falconi » Thu May 05, 2016 9:04 pm

I thinked allready with no success
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: select one button

Postby Silvio.Falconi » Thu May 05, 2016 9:44 pm

this is the test

Code: Select all  Expand view

#include "FiveWin.ch"
#include "constant.ch"


Function Test()
   Local  oDlgNumering, oFld
   Local  nBottom   := 41
   Local  nRight    := 83
   Local  nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local  nHeight := nBottom * DLG_CHARPIX_H
   Local  oBtn[20]
   local n1:= 1
   Local n2:= 1

      DEFINE DIALOG oDlgNumering          ;
      SIZE nWidth, nHeight   PIXEL  ;
      TITLE "test"    ;
      TRANSPARENT

   @ 2.3, 4  FOLDEREX oFld PIXEL  ;
                    ITEMS "test1","test2","test3","test4","test5","test6";
                    SIZE 320, 275


        @  10,2 BTNBMP oBtn[1]   BITMAP "NONE"  SIZE 65,80   OF oFld:aDialogs[1]  PIXEL NOBORDER ;
                          ACTION (n1:=1, n2:=1,oBtn[1]:lPressed)





     @  10,80 BTNBMP oBtn[2]   BITMAP "BULLET"  SIZE 65,80   OF oFld:aDialogs[1]  PIXEL NOBORDER;
        ACTION (n1:= 2, n2:=1 ,oBtn[2]:lPressed )


        ///////


        @  10,2 BTNBMP oBtn[3]   BITMAP "NONE"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION ( n1:= 1, n2:=1 ,oBtn[3]:lPressed )

        @  10,80 BTNBMP oBtn[4]   BITMAP "ARABIC1"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION ( n1:= 3, n2:=1 ,oBtn[4]:lPressed  )

        @  10,160 BTNBMP oBtn[5]  BITMAP "ARABIC2"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION  (n1:= 3, n2:=2,oBtn[5]:lPressed   )

        @  10,240 BTNBMP oBtn[6]   BITMAP "ARABIC3"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION ( n1:= 3, n2:=3, oBtn[6]:lPressed   )

        @  110,80 BTNBMP oBtn[7]  BITMAP "ARABIC4"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION  (n1:= 3, n2:=4,oBtn[7]:lPressed  )

        @  110,160 BTNBMP oBtn[8]   BITMAP "ARABIC5"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION ( n1:= 3, n2:=5,oBtn[8]:lPressed  )

        @  110,240 BTNBMP oBtn[9]   BITMAP "ARABIC6"  SIZE 65,80   OF oFld:aDialogs[2]  PIXEL NOBORDER;
                          ACTION ( n1:= 3, n2:=6,oBtn[9]:lPressed  )



         ///////


          @  10,2 BTNBMP oBtn[10]   BITMAP "NONE"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION  (n1:= 1, n2:=1 ,oBtn[10]:lPressed  )

        @  10,80 BTNBMP oBtn[11]   BITMAP "ARABIC1"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION (n1:= 4, n2:=1 ,oBtn[11]:lPressed  )

        @  10,160 BTNBMP oBtn[12]  BITMAP "ARABIC2"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION ( n1:= 4, n2:=2 ,oBtn[12]:lPressed  )

        @  10,240 BTNBMP oBtn[13]   BITMAP "ARABIC3"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION  (n1:= 4, n2:=3 ,oBtn[13]:lPressed  )

        @  110,80 BTNBMP oBtn[14]  BITMAP "ARABIC4"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION  (n1:= 4, n2:=4 ,oBtn[14]:lPressed  )

        @  110,160 BTNBMP oBtn[15]   BITMAP "ARABIC5"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION  (n1:= 4, n2:=5,oBtn[15]:lPressed   )

        @  110,240 BTNBMP oBtn[16]   BITMAP "ARABIC6"  SIZE 65,80   OF oFld:aDialogs[3]  PIXEL NOBORDER;
                          ACTION  (n1:= 4, n2:=6,oBtn[16]:lPressed   )



        ///////
ACTIVATE DIALOG oDlgNumering CENTER

                msginfo(n1,n2)
RETURN NIL





any solution ?
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: select one button

Postby Antonio Linares » Fri May 06, 2016 7:50 am

Silvio,

I have tested your example but I don't understand what you try to do, sorry
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: select one button

Postby karinha » Fri May 06, 2016 1:45 pm

Silvio explain in more detail what you need to do because I did not understand...

Image

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7814
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: select one button

Postby Silvio.Falconi » Fri May 06, 2016 5:21 pm

I CANNOT SAY TO YOU
IT 'S A SURPRICE !!!!!
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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests