Color scheme: Riviera
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » WKL Forms Object Library troubleshooting » A disabled button or switch is not drawn

A disabled button or switch is not drawn

Environment

WklButton and WklToggleSwitch before release 1.33, in Access forms with Enabled = No.

Cause

Access doesn't give a disabled ActiveX control a window; instead, it asks the control to draw an image of itself. To draw that image, the control reads Enabled from Access. Before 1.33, the control read the value in a way that accepted only a 16-bit number, but Access passes it as a Boolean (VT_BOOL). The read failed, the image stayed empty, and the control's area remained blank in Form view. WklTokenBox read Locked the same way, and it failed the same way.

Resolution

Install release 1.33 or later and register it (see Versions). The disabled control is then drawn in gray, just as Access draws its own disabled buttons. You don't need to change the database.

en/wiki/msaccess/comctl/troubleshooting/disabled-control-not-drawn.txt · Last modified: by Wolfgang van der Stille