Page 1 of 1

Graphic problem 1

Posted: Tue Jan 23, 2007 1:03 pm
by Ugo
Dear Fwh's,
i found a little problem with RadioButton and Checkbox insert into the Folder.
Using the keyboard, focus is not looked on these controls.
The test is
Ugo wrote:Se invece uso il folder con i resources non mi appare mai la retinatura attorno ai Check e ai radio button:

Code: Select all

function Main()

   Local oDlg, cVar1, cVar2, nVar1, nVar2, cVar3, lVar1, lVar2, oFld, oCbx

   cVar1 := "Test1"
   cVar2 := "Test2"
   cVar3 := "One"
   lVar1 := .T.
   nVar1 := 1
   lVar2 := .T.
   nVar2 := 2

   DEFINE DIALOG oDlg RESOURCE "TestTabFolder"

   REDEFINE FOLDER oFld ID 1000 ITEMS "Test1", "Test2" DIALOGS "Folder", "Folder" OF oDlg

   REDEFINE GET cVar1 ID 101 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE GET cVar2 ID 102 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE RADIO nVar1 ID 103, 104 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE RADIO nVar2 ID 105, 106 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE COMBOBOX oCbx VAR cVar3 ITEMS { "One", "Two", "Three", "Four" } ID 107 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE CHECKBOX lVar2 ID 108 OF oFld:aDialogs[1] WHEN lVar1
   REDEFINE CHECKBOX lVar1 ID 109 OF oFld:aDialogs[1] ON CHANGE oDlg:AEvalWhen( oFld[1] )

   REDEFINE GET cVar1 ID 101 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE GET cVar2 ID 102 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE RADIO nVar1 ID 103, 104 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE RADIO nVar2 ID 105, 106 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE COMBOBOX cVar3 ITEMS { "One", "Two", "Three", "Four" } ID 107 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE CHECKBOX lVar2 ID 108 OF oFld:aDialogs[2] WHEN lVar1
   REDEFINE CHECKBOX lVar1 ID 109 OF oFld:aDialogs[2] ON CHANGE oDlg:AEvalWhen( oFld[2] )

   ACTIVATE DIALOG oDlg

   RETURN Nil
con questa dialog:

Code: Select all

TestTabFolder DIALOG 6, 15, 222, 127
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CAPTION "Test TAB Folder"
FONT 8, "MS Sans Serif"
{
 CONTROL "SysTabControl32", 1000, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 3, 4, 216, 123
}
e questo folder:

Code: Select all

Folder DIALOG 6, 15, 213, 114
STYLE WS_CHILD | WS_VISIBLE | WS_BORDER
FONT 8, "MS Sans Serif"
{
 EDITTEXT 101, 11, 17, 39, 12
 EDITTEXT 102, 13, 34, 37, 12
 CONTROL "Radio", 103, "BUTTON", BS_AUTORADIOBUTTON, 74, 18, 60, 12
 CONTROL "Radio", 104, "BUTTON", BS_AUTORADIOBUTTON, 75, 32, 60, 12
 CONTROL "Radio", 105, "BUTTON", BS_AUTORADIOBUTTON, 143, 19, 60, 12
 CONTROL "Radio", 106, "BUTTON", BS_AUTORADIOBUTTON, 143, 31, 60, 12
 CHECKBOX "Checkbox", 108, 115, 91, 60, 12, BS_AUTOCHECKBOX | WS_TABSTOP
 COMBOBOX 107, 18, 64, 49, 33, CBS_DROPDOWNLIST | WS_TABSTOP
 GROUPBOX "Group", -1, 4, 4, 204, 110, BS_GROUPBOX
 CHECKBOX "Checkbox", 109, 25, 91, 60, 12, BS_AUTOCHECKBOX | WS_TABSTOP
}
Enrico not confirm this problem, but its exe does not work on my computer and in many others.
Someone can confirm or not?

Many thanks for your replies

Posted: Tue Jan 23, 2007 2:39 pm
by Otto
I have a similar problem.
Do you have a ready exe and a prg so I can test here.
Regards
Otto

Posted: Tue Jan 23, 2007 5:44 pm
by Ugo
Otto wrote:I have a similar problem.
Do you have a ready exe and a prg so I can test here.
Regards
Otto
Hi Otto,
the prg and the resources are in my previous post,
send to me your private mail address for ready exe.
Regards,
Ugo

Posted: Tue Jan 23, 2007 7:06 pm
by Antonio Linares
Ugo,

We confirm the bug. We are working to fix it

Posted: Tue Jan 23, 2007 7:31 pm
by Antonio Linares
Ugo,

If you place a pushbutton and it gets focus, then the focus starts working fine. We need to find why

Posted: Fri Jan 26, 2007 3:37 pm
by Ugo
Antonio Linares wrote:If you place a pushbutton and it gets focus, then the focus starts working fine. We need to find why
Antonio,
in my test if the button is on the folder not work.
The button must be inserted on the main dialog.

Posted: Fri Jan 26, 2007 3:53 pm
by Ugo
Antonio,
still trying I have verified that if uses the mouse it does not work!
After to be passed on the button with the keyboard it works well.

Posted: Fri Jan 26, 2007 6:11 pm
by Ugo
Hi friend,
this is a little work-around:

as Antonio asserts, is sufficient to insert a button on the main dialog, for example with ID 100.

Code: Select all

Main dialog resource code:
 PUSHBUTTON "Button", 100, 160, 127, 50, 14

insert in the prg:
   REDEFINE BUTTON oBtt ID 100 OF oDlg

...

   ACTIVATE DIALOG oDlg ;
         ON INIT ( oBtt:SetFocus(), ;
                   __KeyBoard( Chr( 13 ) ), ;  
                   oDlg:GoNextCtrl( oBtt:hWnd ), ;
                   oBtt:Hide(), ;  // For hide the button  ;-) 
                   .F. )
Antonio, thank you! :D