Problems with Checkbox
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Problems with Checkbox
Hi.
I have noticed that on some dialogs the presence of a checkbox erases part of the dialog. Look at his snapshots:
and then after clicking on the checkmark:
Notice how before clicking the other 2 checkboxes were erased as well as part of the border of the dialog.
This happens a lot with checkboxes on dialogs from resources. Is there a fix?
Reinaldo.
I have noticed that on some dialogs the presence of a checkbox erases part of the dialog. Look at his snapshots:
and then after clicking on the checkmark:
Notice how before clicking the other 2 checkboxes were erased as well as part of the border of the dialog.
This happens a lot with checkboxes on dialogs from resources. Is there a fix?
Reinaldo.
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Reinaldo
I have the same problem
If you are using win 7 , a workaround for this is to change the shortcut for your application and at compatibility level, set "avoid display effects" (sorry for translation, but you will find)
A side effect, apps are not themed anymore. We definitely need a fix for this.
PS : for Antonio, the problem only occurs when you hide some controls at init display
Hth
Richard
I have the same problem
If you are using win 7 , a workaround for this is to change the shortcut for your application and at compatibility level, set "avoid display effects" (sorry for translation, but you will find)
A side effect, apps are not themed anymore. We definitely need a fix for this.
PS : for Antonio, the problem only occurs when you hide some controls at init display
Hth
Richard
Re: Problems with Checkbox
Salutacions, saludos, regards
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
"...programar es fácil, hacer programas es difícil..."
https://modharbour.app
https://modharbour.app/compass
https://forum.modharbour.app
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Carles
I have tried it before and it works BUT There will be no more themes in the application ! So it is not an acceptable solution. Better change the shortcut when necessary (it does the same without changing the program).
We need a fix for the bug. Antonio ?
Richard
I have tried it before and it works BUT There will be no more themes in the application ! So it is not an acceptable solution. Better change the shortcut when necessary (it does the same without changing the program).
We need a fix for the bug. Antonio ?
Richard
- reinaldocrespo
- Posts: 918
- Joined: Thu Nov 17, 2005 5:49 pm
- Location: Fort Lauderdale, FL
Re: Problems with Checkbox
Richard / Carles;
Hi. Thank you for the reply. Changing the return value of IsAppThemed() has side effects as dialogs become dull, thus it is not an acceptable solution. Changing the shortcut values or telling all users to do so, would be a hassle plus users will conclude that the app is not totally compatible with win7.
I can't imagine that all fw users must live with the problem.... ? What is everyone else doing? Should we avoid using checkboxes?
Reinaldo.
Hi. Thank you for the reply. Changing the return value of IsAppThemed() has side effects as dialogs become dull, thus it is not an acceptable solution. Changing the shortcut values or telling all users to do so, would be a hassle plus users will conclude that the app is not totally compatible with win7.
I can't imagine that all fw users must live with the problem.... ? What is everyone else doing? Should we avoid using checkboxes?
Reinaldo.
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
I never notice such problem in my apps. Can you build a reduced sample showing the problem?reinaldocrespo wrote:I can't imagine that all fw users must live with the problem.... ? What is everyone else doing?
EMG
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Enrico
try the following sample that shows the problem , i am running on windows 7
resource
try the following sample that shows the problem , i am running on windows 7
Code: Select all
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oChk1 := .F., ;
oChk2 := .F., ;
oChk3 := .F., ;
oChk4 := .F., ;
oChk5 := .F., ;
ODLG,OBJ1,OBJ2
DEFINE DIALOG ODLG RESOURCE "TEST3" COLORS CLR_BLACK,CLR_BLUE TRANSPARENT
REDEFINE CHECKBOX OBJ1 VAR OCHK1 ID 201 OF ODLG COLOR CLR_GREEN
REDEFINE CHECKBOX OBJ2 VAR OCHK2 ID 202 OF ODLG COLOR CLR_GREEN
REDEFINE CHECKBOX OCHK3 ID 203 OF ODLG COLOR CLR_GREEN
REDEFINE CHECKBOX OCHK4 ID 204 OF ODLG COLOR CLR_GREEN
REDEFINE CHECKBOX OCHK5 ID 205 OF ODLG COLOR CLR_GREEN
REDEFINE BUTTON ID 01 OF ODLG ACTION ODLG:END()
REDEFINE BUTTON ID 02 OF ODLG ACTION ODLG:END()
ACTIVATE DIALOG ODLG CENTERED ON INIT(OBJ1:HIDE())
RETURN NIL
Code: Select all
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 5.00".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
TEST3 DIALOG DISCARDABLE 9, 16, 232, 132
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "CHECKBOX TEST"
FONT 10, "Tahoma"
{
CONTROL "CHECKBOX 1", 201, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 4, 8, 108, 9, WS_EX_TRANSPARENT
CONTROL "OK", IDOK, "Button", BS_DEFPUSHBUTTON|WS_TABSTOP, 0, 104, 42, 21
CONTROL "Annuler", IDCANCEL, "Button", WS_TABSTOP, 188, 104, 42, 21
CONTROL "CHECKBOX 2", 202, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 4, 24, 108, 9, WS_EX_TRANSPARENT
CONTROL "CHECKBOX 3", 203, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 4, 40, 108, 9, WS_EX_TRANSPARENT
CONTROL "CHECKBOX 4", 204, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 0, 56, 108, 9, WS_EX_TRANSPARENT
CONTROL "CHECKBOX 5", 205, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 0, 72, 108, 9, WS_EX_TRANSPARENT
}
Re: Problems with Checkbox
I modify control.prg
seek checkbox on this forum please I saw the modifies of linares here
seek checkbox on this forum please I saw the modifies of linares here
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
The modifications of control.prg are included in fwh 11.04 an the problem is still there
It is not related to transparency, removing all transparents clausus from program and resources will make the dialog flicker less but still flickers
There is a serious bug in checkbox.
Antonio can you help ?
Thank you
Richard
It is not related to transparency, removing all transparents clausus from program and resources will make the dialog flicker less but still flickers
There is a serious bug in checkbox.
Antonio can you help ?
Thank you
Richard
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
There's something wrong in your sample. This is a working sample:
EMG
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oCk1, lCk1 := .F.
LOCAL oCk2, lCk2 := .F.
LOCAL oCk3, lCk3 := .F.
DEFINE DIALOG oDlg;
RESOURCE "TEST";
COLOR CLR_BLACK, CLR_BLUE;
TRANSPARENT
REDEFINE CHECKBOX oCk1 VAR lCk1;
ID 101 OF oDlg;
COLOR CLR_GREEN
REDEFINE CHECKBOX oCk2 VAR lCk2;
ID 102 OF oDlg;
COLOR CLR_GREEN
REDEFINE CHECKBOX oCk3 VAR lCk3;
ID 103 OF oDlg;
COLOR CLR_GREEN
ACTIVATE DIALOG oDlg;
ON INIT oCk1:Hide();
CENTER
RETURN NIL
Code: Select all
TEST DIALOG 37, 56, 158, 143
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Test"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
CONTROL "Test 1:", 101, "BUTTON", BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 10, 35, 12
CONTROL "Test 2:", 102, "BUTTON", BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 25, 35, 12
CONTROL "Test 3:", 103, "BUTTON", BS_AUTOCHECKBOX | BS_LEFTTEXT | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 10, 40, 35, 12
}
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
Ok, I can reproduce the problem when the manifest is not linked in. Try to add
inside checkbox.prg and test it in all the conditions, please.
EMG
Code: Select all
METHOD HandleEvent() INLINE NIL
EMG
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Enrico
Thanks for your help
It occurs even if the manifest is linked in , especially under win7 64 with aero theme (standard pc's today)
I have changed control.prg and now i have it working in all cases, only one side effect with skinbuttons ... but il can live without skinbuttons
i will test the change to checkbox also as it makes sense,
Thanks again
Richard
Thanks for your help
It occurs even if the manifest is linked in , especially under win7 64 with aero theme (standard pc's today)
I have changed control.prg and now i have it working in all cases, only one side effect with skinbuttons ... but il can live without skinbuttons
i will test the change to checkbox also as it makes sense,
Thanks again
Richard
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Problems with Checkbox
Enrico
Your solution is OK , no need to change control.prg
Hopefully Antonio will change checkbox.prg for further release , so we will not have to worry about it
Best regards
Your solution is OK , no need to change control.prg
Hopefully Antonio will change checkbox.prg for further release , so we will not have to worry about it
Best regards
- carlos vargas
- Posts: 1421
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: Problems with Checkbox
for xharbour only
this variant is for not modify the checkbox.prg
add in you project
this variant is for not modify the checkbox.prg
add in you project
Code: Select all
...
EXTEND CLASS TCHECKBOX WITH METHOD MyHandleEvent
...
STATIC FUNCTION MyHandleEvent()
LOCAl Self := HB_QSelf()
RETURN NIL
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Problems with Checkbox
I just fixed checkbox.prg in the FWH SVN.Richard Chidiak wrote:Enrico
Your solution is OK , no need to change control.prg
Hopefully Antonio will change checkbox.prg for further release , so we will not have to worry about it
Best regards
EMG