Page 1 of 1

Error Disable on Folder

PostPosted: Wed Apr 07, 2010 4:37 pm
by MdaSolution
I want disable a folder from a checkbox

Look this test sample


Code: Select all  Expand view


#Include "Fivewin.ch"
#Include "dtpicker.ch"
#include "xbrowse.ch"





Function Test()
   Local oFrm
   Local ock1,ock2
Local oFld1

Define DIALOG oFrm TITLE "Test" ;
       FROM 452, 774 to 880, 1303 PIXEL COLOR 0, 14215660


 @  35,   3 FOLDER oFld1 Items "&One",;
                                 "Two",;
                                 "&Tree",;
                                 "Four",;
                                 "&Five",;
                                 "&Six",;
                                 "S&even",;
                                 "&Eight";
              SIZE 261, 165 PIXEL;
              OF oFrm COLOR 0, 14215660




 @  19,  5 CHECKBOX ock2  Prompt "test check" SIZE  100,  10 PIXEL  OF oFld1:aDialogs[2] ;
      ON CHANGE (IIF(ock2, oFld1:aEnable := { .T., .T., .T., .T., .T., .T.,.T.,.T.},;
                           oFld1:aEnable := { .T., .T., .F., .T., .T., .T.,.T.,.T.}))


 ACTIVATE DIALOG oFrm   RESIZE16 CENTERED ;
           ON INIT ( oFld1:aEnable := { .T., .T., .F., .T., .T., .T.,.T.,.T.} )
  Return NIL





I want disable the Folder number 3 ...

When I not check the checkbox

It was disabled but the caption of folder number 3 not change the color ....why ?

Re: Error Disable on Folder

PostPosted: Wed Apr 07, 2010 5:30 pm
by ukoenig
I noticed the same.
I disabled Page 2 from Dialog-Level.
The page is disabled, but it is still possible to set the Tab-Focus.

Image

REDEFINE CHECKBOX oCheck0 VAR lCheck ID 150 COLOR 128, 10853885 OF oDlg70 ;
ON CHANGE ( IIF( lCheck, oFolder:aEnable := { .T., .T., .T., .T., .T. },;
oFolder:aEnable := { .T., .F. , .T., .T., .T. } ) ) // Page 2 disabled
oCheck0:SetFont( oTextFont )

Best Regards
Uwe :lol:

Re: Error Disable on Folder

PostPosted: Thu Apr 08, 2010 8:06 am
by MdaSolution
any solution ?