bChange : Difference TFolder() vs. TFolderEx()

bChange : Difference TFolder() vs. TFolderEx()

Postby Jimmy » Mon Feb 06, 2023 4:34 am

hi,

attach Sample start with TFolderEx() (see high-light on TAB)
Code: Select all  Expand view  RUN
#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  RUN
  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
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Postby Antonio Linares » Mon Feb 06, 2023 7:50 am

Dear Jimmy,

Class TFolderEx uses bAction instead of bChange
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby Jimmy » Mon Feb 06, 2023 8:14 am

hi Antonio,
Antonio Linares wrote:Class TFolderEx uses bAction instead of bChange

aha, ok understand
thx
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 105 guests