From: TW on
> The "Calculator Modes," "Solve Equation,"
> TVM (Time Value of Money) forms (and others) do,
> so how do they do that?


Not sure exactly what you mean. The menu keys such as CHOOS and EDIT
appear and change reflecting the field type, and in other places items
will appear and disappear, but I can't remember one that changes the
menu completely when you move onto a new field.

TW
From: Andreas Möller on
Hi Tim,

> but I can't remember one that changes the
> menu completely when you move onto a new field.
I have some code that does it and as I mentioned it is easiest to do
this in the menu program directly.

Regards,
Andreas
From: TW on
> > but I can't remember one that changes the
> > menu completely when you move onto a new field.
>
> I have some code that does it and as I mentioned it is easiest to do
> this in the menu program directly.

Yes, I know. I was referring to a place in the ROM where it does this.
I've written some inform boxes that do this as well, although
generally I've found that with some thought and rethinking the user
experience you don't have to do it.

TW


From: John H Meyers on
On Tue, 03 Nov 2009 09:35:39 -0600, TW wrote:

>> The "Calculator Modes," "Solve Equation,"
>> TVM (Time Value of Money) forms (and others) do,
>> so how do they do that?

> Not sure exactly what you mean.
> The menu keys such as CHOOS and EDIT
> appear and change reflecting the field type,
> and in other places items will appear and disappear,
> but I can't remember one that changes the menu completely
> when you move onto a new field.

In "Solve Equation," CHOOS appears for the equation,
but not for a variable, and SOLVE appears for any variable,
while EXPR= appears instead, in the same place, for the equation.

In "Solve Finance" (TVM), SOLVE disappears for P/YR,
and both EDIT and CHOOS "flip" (plus some changes on menu page 2)
for the Beg/End selection.

Perhaps this is not "changes the menu completely,"
as in substituting an entire new menu,
but items within the menu certainly do change.

[r->] [OFF]
From: Andreas Möller on
Hello,

> Perhaps this is not "changes the menu completely,"
> as in substituting an entire new menu,
> but items within the menu certainly do change.
If you do it for every menukey then it is, but of course you can do it
for selected keys only.

A simple example for a dynamic soft menu with DoInputForm:

{ :: TakeOver GetFocus ONE#> ITE "Text1" "Text1" ;
:: TakeOver
5GETLAM GetFocus ONE#>
ITE
:: Program1 ;
:: Program2 ;
;
}

Note: You should not hardcode strings as this prevents translation,
use a message table instead.
GetFocus is 5GETLAM in DoInputForm, this will not work with IfMain,
read Informbox.h for IfMain which comes with debug4x.

HTH,
Andreas