|
TPW - Disable CheckBox ??
Author |
Message |
Sebastian Koppeh #1 / 5
|
TPW - Disable CheckBox ??
Hello, does anyone know how to enable / disable a checkbox in a dialog by a procedure of the dialog-object? I know it's possible, the checkbox is drawn in grey colour when disabled. It's also possible to have the checkbox disabled in the Resource Workshop, but then it is *always* disabled and that's not what I want. Thanks in advance, Basti -- -----------------------------------------------------------------------
Fleestedt, Germany -----------------------------------------------------------------------
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
Dominique Lo #2 / 5
|
TPW - Disable CheckBox ??
Quote: >Hello, >does anyone know how to enable / disable a checkbox >in a dialog by a procedure of the dialog-object? >I know it's possible, the checkbox is drawn in grey >colour when disabled. It's also possible to have the >checkbox disabled in the Resource Workshop, but then >it is *always* disabled and that's not what I want.
Try to play with EnableWindow or ShowWindow with the window handle of your control. _____ Dominique LOVY, Dept. de Chimie-Physique, Universite de GENEVE
__/__/___ Tel: ++41 22 7026525 Fax: ++41 22 7026518
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
Michael Slac #3 / 5
|
TPW - Disable CheckBox ??
Quote:
> Hello, > does anyone know how to enable / disable a checkbox > in a dialog by a procedure of the dialog-object? > I know it's possible, the checkbox is drawn in grey > colour when disabled. It's also possible to have the > checkbox disabled in the Resource Workshop, but then > it is *always* disabled and that's not what I want.
To disable: EnableWindow(GetDlgItem(DlgWindowHandle,idofcontrol),FALSE); To enable a disabled control/window, replace the FALSE with a TRUE. Mike
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
Martin Irela #4 / 5
|
TPW - Disable CheckBox ??
Quote: >Hello, >does anyone know how to enable / disable a checkbox >in a dialog by a procedure of the dialog-object? >I know it's possible, the checkbox is drawn in grey >colour when disabled. It's also possible to have the >checkbox disabled in the Resource Workshop, but then >it is *always* disabled and that's not what I want. >Thanks in advance, > Basti >-- >---------------------------------------------------------------------- -
> Fleestedt, Germany >---------------------------------------------------------------------- - >> Define your checkbox with style bs_3state. Then in setupwindow issue
a setcheck(2) to it to turn it gray. Quote: >> Martin
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
Martin Irela #5 / 5
|
TPW - Disable CheckBox ??
Quote: >Hello, >does anyone know how to enable / disable a checkbox >in a dialog by a procedure of the dialog-object? >I know it's possible, the checkbox is drawn in grey >colour when disabled. It's also possible to have the >checkbox disabled in the Resource Workshop, but then >it is *always* disabled and that's not what I want. >Thanks in advance, > Basti >-- >---------------------------------------------------------------------- -
> Fleestedt, Germany >---------------------------------------------------------------------- - >> Further to my previous answer on this subject, you need to turn off
bs_autocheckbox attribute as well as turning on bs_3state attribute in your constructor procedure. Martin
|
Wed, 18 Jun 1902 08:00:00 GMT |
|
|
|