XBROWSE CHECKBOX

XBROWSE CHECKBOX

Postby Silvio » Fri Nov 26, 2010 4:02 pm

I TRY TO MAKE A XBROWSE WITH CHECKBOX BUT IT NOT RUN WHY ?

Code: Select all  Expand view



#include 'fivewin.ch'
#include 'xbrowse.ch'



Function Main()
   Local oDlg,olbx
   Local  cIniFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "test.ini"
   Local cSay_Disco:=GetPvProfString("Events","DEVICES","Mostra/Nascondi Disco",cInifile)
   Local aDrives := {  cSay_Disco+ ' A:' ,;
                     cSay_Disco+ ' B:' ,;
                     cSay_Disco+ ' C:' ,;
                     cSay_Disco+ ' D:' ,;
                     cSay_Disco+ ' E:' ,;
                     cSay_Disco+ ' F:' ,;
                     cSay_Disco+ ' G:' ,;
                     cSay_Disco+ ' H:' ,;
                     cSay_Disco+ ' I:' ,;
                     cSay_Disco+ ' J:' ,;
                     cSay_Disco+ ' K:' ,;
                     cSay_Disco+ ' L:' ,;
                     cSay_Disco+ ' M:' ,;
                     cSay_Disco+ ' N:' ,;
                     cSay_Disco+ ' O:' ,;
                     cSay_Disco+ ' P:' ,;
                     cSay_Disco+ ' Q:' ,;
                     cSay_Disco+ ' R:' ,;
                     cSay_Disco+ ' S:' ,;
                     cSay_Disco+ ' T:' ,;
                     cSay_Disco+ ' U:' ,;
                     cSay_Disco+ ' V:' ,;
                     cSay_Disco+ ' W:' ,;
                     cSay_Disco+ ' X:' ,;
                     cSay_Disco+ ' Y:' ,;
                     cSay_Disco+ ' Z:'    }



DEFINE DIALOG oDlg SIZE 400,400

       for n := 1 to len( aDrives )
        lvalore:=iif( GetPvProfString("Driver",aDrives[n],"",cInifile)=="S", .T.,.F.)
            AAdd( aDrives[n],lvalore)
         next


         @ 0,0 XBROWSE   oLbx    OF oDlg ;
      AUTOCOLS ;
      ARRAY aDrives ;
      HEADERS ''  '," "' ;
      PICTURES nil, nil ;
      SIZE 200,200


    WITH OBJECT oLbx
      :SetCheck( .t., )
   END
 


i WANT SHOW THE LIST OF ALL DEVICES AND IT MUST RETURN ALL THE ITEMS LCHECKED = .T.


THERE IS A LCHEKED DATA ON XBROWSE CLASS ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: XBROWSE CHECKBOX

Postby frose » Fri Nov 26, 2010 5:40 pm

Silvio,

there is a syntax error in the line
Code: Select all  Expand view
AAdd( aDrives[n],lvalore)


Do you have the line
Code: Select all  Expand view
olbx:CreateFromCode()
?
Windows 11 Pro 22H2 22621.1848
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Harbour 3.2.0dev (r2008190002)
FWH 23.10 x86
User avatar
frose
 
Posts: 392
Joined: Tue Mar 10, 2009 11:54 am
Location: Germany, Rietberg

Re: XBROWSE CHECKBOX

Postby Silvio » Fri Nov 26, 2010 7:59 pm

yes I saw
But How I can assign .t. or .f. from ini file ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi, RSalazarU and 66 guests