Page 2 of 2
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 16, 2011 11:08 pm
by Antonio Linares
Mauri,
With this change in Method GoNextCtrl() your example works fine. Please notice that we use IsWindowEnabled() to check for disabled controls:
Code: Select all | Expand
METHOD GoNextCtrl( hCtrl ) CLASS TWindow
local hCtlNext, nAt
if ! Empty( ::aControls ) .and. hCtrl == ::LastActiveCtrl():hWnd .and. ;
! Empty( ::oWnd ) .and. ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
hCtlNext = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd )
::hCtlFocus = hCtrl
SetFocus( hCtlNext )
else
nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
if nAt != 0
nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
while ! lAnd( GetWindowLong( ::aControls[ nAt ]:hWnd, GWL_STYLE ), WS_TABSTOP ) .or. ;
! IsWindowEnabled( ::aControls[ nAt ]:hWnd )
nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
end
SetFocus( ::aControls[ nAt ]:hWnd )
endif
endif
return nil
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Thu Nov 17, 2011 12:05 am
by mauri.menabue
Antonio,
Ok ! for now
thank
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Thu Nov 17, 2011 9:46 pm
by ukservice
Antonio,
So it is fixed?
Will you publish a revised build?.
Thanks
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Thu Nov 17, 2011 10:17 pm
by Antonio Linares
John,
We will publish FWH 11.11 in a few days
![Smile :-)](./images/smilies/icon_smile.gif)
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Tue Nov 22, 2011 3:58 pm
by mauri.menabue
hi all
try this samples, with STYLE CBS_DROPDOWN does not work
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCbx, oCbx1, oCbx2
local cText := "THREE"
local cText1 := "DUE"
local cText2 := "3"
DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"
@ 0.5, 1 COMBOBOX oCbx VAR cText STYLE CBS_DROPDOWN ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )
@ 2, 1 COMBOBOX oCbx1 VAR cText1 STYLE CBS_DROPDOWN ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) when .f.
@ 3, 1 COMBOBOX oCbx2 VAR cText2 STYLE CBS_DROPDOWN ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )
ACTIVATE DIALOG oDlg CENTERED
return nil
while this samples without STYLE CBS_DROPDOWN work fine
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCbx, oCbx1, oCbx2
local cText := "THREE"
local cText1 := "DUE"
local cText2 := "3"
DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"
@ 0.5, 1 COMBOBOX oCbx VAR cText ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )
@ 2, 1 COMBOBOX oCbx1 VAR cText1 ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) when .f.
@ 3, 1 COMBOBOX oCbx2 VAR cText2 ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )
ACTIVATE DIALOG oDlg CENTERED
return nil
thank
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Tue Nov 22, 2011 4:33 pm
by ukservice
Thank you Antonio.
Please, this error is quite important. Without being fixed, I can´t update FWH as many of my customers use tab to complete forms and navigate into fields.
Thank you for your attention.
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 23, 2011 11:07 am
by ukservice
Hello,
Will be fixed in Fw 11.11?.
If I can do anything to help, please indicate.
Thanks.
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 23, 2011 3:29 pm
by Antonio Linares
Mauri,
FWH code is fine
![Smile :-)](./images/smilies/icon_smile.gif)
The sample is wrong as you are not using WS_TABSTOP style. This is the right code for the example:
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local oDlg, oCbx, oCbx1, oCbx2
local cText := "THREE"
local cText1 := "DUE"
local cText2 := "3"
DEFINE DIALOG oDlg FROM 10, 10 TO 20, 50 ;
TITLE "DropDown ComboBox Test"
@ 0.5, 1 COMBOBOX oCbx VAR cText STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "ONE", "TWO", "THREE" } ;
ON CHANGE oDlg:SetText( cText )
@ 2, 1 COMBOBOX oCbx1 VAR cText1 STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "UNO", "DUE", "TRE" } ;
ON CHANGE oDlg:SetText( cText1 ) WHEN .F.
@ 3, 1 COMBOBOX oCbx2 VAR cText2 STYLE nOr( CBS_DROPDOWN, WS_TABSTOP ) ;
ITEMS { "1", "2", "3" } ;
ON CHANGE oDlg:SetText( cText2 )
ACTIVATE DIALOG oDlg CENTERED
return nil
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 23, 2011 3:37 pm
by Antonio Linares
With this change in Class TWindow Method GoNextCtrl() we get it properly working even if the example code is wrong
![Smile :-)](./images/smilies/icon_smile.gif)
Included for FWH 11.11
Code: Select all | Expand
METHOD GoNextCtrl( hCtrl ) CLASS TWindow
local hCtlNext, nAt, nStart
if ! Empty( ::aControls ) .and. hCtrl == ::LastActiveCtrl():hWnd .and. ;
! Empty( ::oWnd ) .and. ( ( Upper( ::oWnd:ClassName() ) $ "TFOLDER;TPAGES;TFOLDEREX" ) )
hCtlNext = NextDlgTab( ::oWnd:oWnd:hWnd, ::oWnd:hWnd )
::hCtlFocus = hCtrl
SetFocus( hCtlNext )
else
nAt = AScan( ::aControls, { | o | o:hWnd == hCtrl } )
if nAt != 0
nStart = nAt
nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
while ( ! lAnd( GetWindowLong( ::aControls[ nAt ]:hWnd, GWL_STYLE ), WS_TABSTOP ) .or. ;
! IsWindowEnabled( ::aControls[ nAt ]:hWnd ) ) .and. nAt != nStart
nAt = If( nAt < Len( ::aControls ), nAt + 1, 1 )
end
SetFocus( ::aControls[ nAt ]:hWnd )
endif
endif
return nil
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 23, 2011 6:11 pm
by Rimantas
Antonio Linares wrote:With this change in Class TWindow Method GoNextCtrl() we get it properly working even if the example code is wrong
![Smile :-)](./images/smilies/icon_smile.gif)
Included for FWH 11.11
Code: Select all | Expand
METHOD GoNextCtrl( hCtrl ) CLASS TWindow
local hCtlNext, nAt, nStart
...
return nil
Hi Antonio ,
Get object code block bLostFocus is also not working properly . Is this related to GoNextCtrl() ? I maked changes in window.prg , added this prg to project - still isn't working ...
Regards,
Re: Error in last version FWH 11.10 (Folder + get)
Posted: Wed Nov 23, 2011 7:29 pm
by Antonio Linares
Rimantas,
Please post a small example to test it.
Here, on our apps, it is working fine
![Smile :-)](./images/smilies/icon_smile.gif)