Re: New Era - ixRadiobuttons
Posted in 1998
--------------5BB6AC9C8BEDACE0D677735B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit robert_morrison@tertio.com wrote: > How can I select() or call push() on a radio button using enter (CR/LF)? > [New Era 3.10] > The documentation and on-line help suggest it can't be done, but where there's > a will... BEGIN RANT Good luck. Other keys could be used by assigning them as accelerators to an ixMenu (see below), but beware that new versions of NewEra (I'm running 3.10.TC1) are flaky in the area of trapping combinations of Return (Return, Ctrl+Return, Alt+Return, etc.). In the good old days, you could trap Return with accelerator Ctrl+M, but that went away recently. Ctrl+Return is the same at Ctrl+J (I think; I'm going from vague memory now, but the point is the same - certain Return combinations relate to certain Ctrl+alpha combinations and some don't), but it's changed in bug fix releases & etc. so often that I'm not sure what expected behavior is anymore. There's a feature request (submitted by me) to allow ANY ASCII value to become an accelerator; which means we could assign ASCII 13 (RETURN) to an accelerator and do tons of nifty things (including shooting ourselves in the foot). Or you could trap and disallow the use of the letter "w" anywhere in your application (which I support; any letter whose name has more than one syllable should be eliminated). END RANT You could, however, assign some other accelerator key: e.g. Two Radio buttons rbOne and rbTwo. Title them with underscores to visually cue the user that hot keys are assigned ("&One" and "&Two"). create a couple ixMenus with Alt+O Alt+T as accelerators. The activate() events of the ixMenus call a function, sending "O" and "T" respectively. ... IF param = "O" THEN LET myRadioButton = self.rbOne ELSE LET myRadioButton = self.rbTwo END IF -- make sure you check isEnabled(), since the accelerator ignores the state of the ixMenu or the control we're -- working with by default. IF myRadioButton.isEnabled() THEN CALL myRadioButton.push() END IF I hope you get the idea, or at least you're sorry you asked. -- //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 6300 S Syracuse Way Ste 205 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-779-4025 and do not necessarily //////////////// http://www.informix.com reflect those of my employer --------------5BB6AC9C8BEDACE0D677735B Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <HTML> robert_morrison@tertio.com wrote: <BLOCKQUOTE TYPE=CITE>How can I select() or call push() on a radio button using enter (CR/LF)? <BR>[New Era 3.10] <BR>The documentation and on-line help suggest it can't be done, but where there's <BR>a will...</BLOCKQUOTE> BEGIN RANT <P>Good luck. Other keys could be used by assigning them as accelerators to an ixMenu (see below), but beware that new versions of NewEra (I'm running 3.10.TC1) are flaky in the area of trapping combinations of Return (Return, Ctrl+Return, Alt+Return, etc.). <P>In the good old days, you could trap Return with accelerator Ctrl+M, but that went away recently. Ctrl+Return is the same at Ctrl+J (I think; I'm going from vague memory now, but the point is the same - certain Return combinations relate to certain Ctrl+alpha combinations and some don't), but it's changed in bug fix releases & etc. so often that I'm not sure what expected behavior is anymore. <P>There's a feature request (submitted by me) to allow <U>ANY</U> ASCII value to become an accelerator; which means we could assign ASCII 13 (RETURN) to an accelerator and do tons of nifty things (including shooting ourselves in the foot). Or you could trap and disallow the use of the letter "w" anywhere in your application (which I support; any letter whose name has more than one syllable should be eliminated). <P>END RANT <P>You could, however, assign some other accelerator key: e.g. Two Radio buttons rbOne and rbTwo. Title them with underscores to visually cue the user that hot keys are assigned ("&One" and "&Two"). create a couple ixMenus with Alt+O Alt+T as accelerators. The activate() events of the ixMenus call a function, sending "O" and "T" respectively. <P>... <BR>IF param = "O" THEN <BR>LET myRadioButton = self.rbOne <BR>ELSE <BR>LET myRadioButton = self.rbTwo <BR>END IF <P>-- make sure you check isEnabled(), since the accelerator ignores the state of the ixMenu or the control we're <BR>-- working with by default. <BR>IF myRadioButton.isEnabled() THEN <BR>CALL myRadioButton.push() <BR>END IF <P>I hope you get the idea, or at least you're sorry you asked. <P>-- <BR><TT>//////////////// =======================================================</TT> <BR><TT>////////// // Dennis J. Pimple Informix Software, Inc.</TT> <BR><TT>////// / /// Principal Consultant 6300 S Syracuse Way Ste 205</TT> <BR><TT>///// // //// dennisp@informix.com Englewood CO 80111</TT> <BR><TT>//// // /////</TT> <BR><TT>/// // ////// recept: 303-850-0210</TT> <BR><TT>// // /////// direct: 303-740-5611 Opinions expressed are mine,</TT> <BR><TT>/ /////////// fax: 303-779-4025 and do not necessarily</TT> <BR><TT>//////////////// <A HREF="http://www.informix.com">http://www.informix.com</A> reflect those of my employer</TT> <BR> </HTML> --------------5BB6AC9C8BEDACE0D677735B--