I have some code that manages my scrollers, thusly:

 FrmUpdateScrollers(pForm, iScrollUp, iScrollDn, enableUp , enableDown );

I've been gleefully, willfully, and with much recklessness, looking at the
control structure to decide whether a scroller is active...

 ControlPtr pctl = (ControlPtr) FrmGetObjectPtr(pForm, index);
 if(pctl->attr.usable && pctl->attr.enabled)
 // do it...

The reason I check "usable" is that if enableUp and enableDown are both
false, the control is set to usable=0, and "enabled" is not cleared.

Soooo... calling CtlEnabled() is not sufficient.

If enableUp and enableDown are both false, I can call CtlSetEnabled(false)
for each of the scroller controls, but that kinda defeats the purpose of
FrmUpdateScrollers. I can also stuff these variables away in yet-more
globals...  But it seems like I'm having to do a lot of workaround to remove
structure access!

David





-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to