bChange : Difference TFolder() vs. TFolderEx()

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

bChange : Difference TFolder() vs. TFolderEx()

Post by Jimmy »

hi,

attach Sample start with TFolderEx() (see high-light on TAB)

Code: Select all | Expand

#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

   oFld:bChange := {|| UpDateInfo( oCbx, oFld:nOption ) }
now start App again with "any" Parameter for TFolder()
you will see that Combobox change when change TAB
greeting,
Jimmy
User avatar
Antonio Linares
Site Admin
Posts: 42520
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 75 times
Contact:

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

Post by Antonio Linares »

Dear Jimmy,

Class TFolderEx uses bAction instead of bChange
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

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

Post by Jimmy »

hi Antonio,
Antonio Linares wrote:Class TFolderEx uses bAction instead of bChange
aha, ok understand
thx
greeting,
Jimmy
Post Reply