Page 1 of 1

bChange : Difference TFolder() vs. TFolderEx()

PostPosted: Mon Feb 06, 2023 4:34 am
by Jimmy
hi,

attach Sample start with TFolderEx() (see high-light on TAB)
Code: Select all  Expand view
#include "FiveWin.ch"

function Main(cPara)
local oDlg, oFld, oGet, cTest := "Hello world", cAnother := "Another GET"
local oCbx,nPos,cDia := "AAA"

   DEFINE DIALOG oDlg SIZE 400, 400

      @ 1, 3 COMBOBOX oCbx VAR cDia OF oDlg SIZE 100, 300 ;
            ITEMS { "AAA","BBB","CCC" }

IF !EMPTY(cPara)
   @ 40, 5 FOLDER oFld PIXEL ;
      PROMPT "&One", "&Two", "&Three" ;
      SIZE 190, 120
ELSE
   @ 40, 5 FOLDEREX oFld PIXEL ;
      PROMPT "&One", "&Two", "&Three" ;
      SIZE 190, 120
ENDIF

   oFld:bChange := {|| UpDateInfo( oCbx, oFld:nOption ) }

   @ 1, 1 GET oGet VAR cTest OF oFld:aDialogs[ 1 ]

   @ 2, 1 GET cAnother OF oFld:aDialogs[ 1 ]

   @ 9.2, 14 BUTTON "Ok" ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT ( oGet:SetFocus(), .F. )

return nil

STATIC PROCEDURE UpDateInfo( oCombo, nPos )
   oCombo:Select( nPos )
   oCombo:update()

   fwlog PROCNAME( 2 ), PROCLINE( 2 ), nPos
RETURN

when change TAB it does NOT change ComboBox
Code: Select all  Expand view
  oFld:bChange := {|| UpDateInfo( oCbx, oFld:nOption ) }


now start App again with "any" Parameter for TFolder()
you will see that Combobox change when change TAB

Re: bChange : Difference TFolder() vs. TFolderEx()

PostPosted: Mon Feb 06, 2023 7:50 am
by Antonio Linares
Dear Jimmy,

Class TFolderEx uses bAction instead of bChange

Re: bChange : Difference TFolder() vs. TFolderEx()

PostPosted: Mon Feb 06, 2023 8:14 am
by Jimmy
hi Antonio,
Antonio Linares wrote:Class TFolderEx uses bAction instead of bChange

aha, ok understand
thx