Page 1 of 1

assign an action to normal folder class

Posted: Fri Jan 07, 2022 7:57 am
by Silvio.Falconi
I have seen that the Folderex class has a baction method so it seems easy to assign an action when the user selects a specified tab.

Code: Select all | Expand

@0,0 FOLDEREX oFolder PROMPTS aFolder
...

 oFolder:bAction := { || IF(oFolder:nOption=3 .or. oFolder:nOption=6 ,;
                         (oDlg:nHeight:=400,oDlg:Move( aPt[ 1 ] , aPt[ 2 ] )),;
                         (oDlg:nHeight:=680,oDlg:Move( aPt[ 1 ] , aPt[ 2 ] )) ) }
 



Is it possible to do the same thing with the normal Foder ( nofolderex) ?
I saw that the SetOption () method exists, but then I can't get it to work when the user presses a specified folder Tab

Re: assign an action to normal folder class

Posted: Wed Jan 12, 2022 4:51 pm
by James Bott
Silvio,

Why not just used folders?

See fldxbrw.prg in the \samples folder for an example.

You can open all the databases at the start of the program, then you just click on the folder you want.

James

Re: assign an action to normal folder class

Posted: Wed Jan 12, 2022 6:05 pm
by Silvio.Falconi
because I must make a dialog of configuration without databases and I need to have a normal folder because I not wish use folderex class

Re: assign an action to normal folder class

Posted: Thu Jan 13, 2022 12:48 pm
by cnavarro
Try with bChange DATA ( parameters: nOption, nOldOption )

Code: Select all | Expand


   oFld:bChange := { | nOpt, nOldOpt | ..... }