disable combo box and checkbox during runtime

Discuss PocketC for CE (including Desktop Edition)

Postby bvinas on Sat Jun 23, 2001 5:41 pm

Does anyone know how I disable combo box and checkbox during runtime so they are not editable, and then enable them.

I try to send the msg READONLY like I use for edit box, but this doesn't work.

Any Ideas?

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby guy on Sat Jun 23, 2001 6:03 pm

PocketC doesn't have a function to call the Windows CE EnableWindow() function that lets you enable/disable controls.

There are two ways you can achieve the same effect:

1. Delete the control and recreate it but with the enable the way you want, then repeat later to change it back.

2. Create two identical controls in the same place, one enabled, one disabled, one visible, one not visible. When you want to change the enable state, hide one and show the other, then swap to change back.

You need to ensure that you copy the contents of the enabled controls into the disabled controls when you swap from the enable to disable state.

If you use option (1), you have to restore the contents when you recreate the enabled state.

Option 3:

Kevin - Please can we have an API for SetWindowLong() and EnableWindow().


Guy
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby bvinas on Sat Jun 23, 2001 11:51 pm

Guy,

Thanks again.

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby bvinas on Sun Jun 24, 2001 2:09 pm

I implemented Number 2, and it wasn't too bad. Works good. Thanks

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest

cron