Re: Mouseless Check Boxes?
Posted in 1996
HEIRonR wrote: > > I have developed some forms which include check boxes for Yes/No fields. > The user of these forms asked me if there was some way to *check* the box > without reaching for the mouse to click it. > 1) Assuming this is a N.E. problem and not being an expert, lets take a stab at this.... A check box is nothing more than a button with two different icons, either one visible based on a boolean value. Right? [Granted there might be more, but lets keep this simple.] IF this is true, then the button class should have a public method to return the value of the boolean variable. If not, then you should be able to subclass the button adding this method. {if you have to do this, then it is yet another short coming of N.E. objects ;-) You should also have the ability to set this boolean variable in another method. So that when you instanciate (sp?) the object you should be able to set the variable and have the correct icon be set. Or from another method, set the boolean and then display[self]; From your question, do you mean to query the value of the boolean or to set the value of the boolean? Either should be possible, however, you need to have an event to trigger your code. Like if the user selects A, then B,C,D are also automatically selected. 2) Since I am not familiar with N.E., there are several different ways Informix could handle this. 1) Have the ability for each button to have a callback function. So that when the button is pressed, if there is a callback function defined, that code will be called. 2) Have the ability to delegate the control of the object. So that when the event triggers the object, it points the to controlling object. While both options are similar there are some subtle differences. Since this is getting in to an OO design discussion, does anyone from either Informix, or a New Era Guru have any comments? -Mikey #include<std_disclaimer.h>