Home All Groups Group Topic Archive Search About

MenuItems.Clear() Problem

Author
5 Oct 2005 1:01 AM
Davie
I'm developing an application on the smartphone.  To reduce the size of the application i'm using panels where appropriate instead of forms.  As a result of the design, I need to have different context menus on one form.  I had tried to declare two MainMenu items and then simply switch the display accordingly.   eg.


public void displayPanel1(){
this.Menu = this.mainMenu1;  //
this.Refresh();
}

public void displayPanel2(){
this.Menu = this.mainMenu2;
this.Refresh();
}

but this throws a not supported exception.  I am aware that smartphone allows only one menuitem on the left softkey and multiple on the right softkey.  I have adhered to this policy.   I then tried to have one MainMenu and just clear all menuitems then populate the menu depending on which panel i display.

this.rightmenuItem.MenuItems.Clear();

this.rightmenu.MenuItems.Add(this.next_menuItem);

this.rightmenu.MenuItems.Add(this.exit_menuItem);

Again this throws a Not Supported Exception when i try to Clear the list of MenuItems.  I have tried the code on Pocket Pc and this works, how can i display menus on the smartphone?  I have found things on google, but that is where people have placed menuItems on the left hand side.

Any help would be appreciated.

Davie.

Author
5 Oct 2005 9:36 AM
Steven Cheng[MSFT]
Hi Davie,

Thank you for your posting. Regarding on the issue, I am
finding proper resource to assist you and we will update as soon as posible.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security(This posting is provided "AS IS",
with no warranties, and confers no rights.)



--------------------
Show quoteHide quote
| From: "Davie" <Davie@newsgroup.nospam>
| Subject: MenuItems.Clear() Problem
| Date: Wed, 5 Oct 2005 02:01:37 +0100
| Lines: 114
| MIME-Version: 1.0
| Content-Type: multipart/alternative;
|     boundary="----=_NextPart_000_000A_01C5C950.B80A5A20"
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| Message-ID: <OKojZhUyFHA.2***@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: client-82-14-66-221.brnt.adsl.virgin.net 82.14.66.221
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.languages.csharp:126653
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I'm developing an application on the smartphone.  To reduce the size of
the application i'm using panels where appropriate instead of forms.  As a
result of the design, I need to have different context menus on one form. 
I had tried to declare two MainMenu items and then simply switch the
display accordingly.   eg.
| public void displayPanel1(){
| this.Menu = this.mainMenu1;  //
| this.Refresh();
| }
| public void displayPanel2(){
| this.Menu = this.mainMenu2;
| this.Refresh();
| }
| but this throws a not supported exception.  I am aware that smartphone
allows only one menuitem on the left softkey and multiple on the right
softkey.  I have adhered to this policy.   I then tried to have one
MainMenu and just clear all menuitems then populate the menu depending on
which panel i display.
| this.rightmenuItem.MenuItems.Clear();
| this.rightmenu.MenuItems.Add(this.next_menuItem);
| this.rightmenu.MenuItems.Add(this.exit_menuItem);
| Again this throws a Not Supported Exception when i try to Clear the list
of MenuItems.  I have tried the code on Pocket Pc and this works, how can i
display menus on the smartphone?  I have found things on google, but that
is where people have placed menuItems on the left hand side.
Show quoteHide quote
| Any help would be appreciated.
| Davie.
|
Are all your drivers up to date? click for free checkup

Author
5 Oct 2005 9:47 AM
Davie
Thanks once again for your assitance Steven.  :-)


Show quoteHide quote
"Steven Cheng[MSFT]" <stch***@online.microsoft.com> wrote in message
news:R81TCBZyFHA.3020@TK2MSFTNGXA01.phx.gbl...
> Hi Davie,
>
> Thank you for your posting. Regarding on the issue, I am
> finding proper resource to assist you and we will update as soon as
> posible.
>
> Regards,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security(This posting is provided "AS IS",
> with no warranties, and confers no rights.)
>
>
>
> --------------------
> | From: "Davie" <Davie@newsgroup.nospam>
> | Subject: MenuItems.Clear() Problem
> | Date: Wed, 5 Oct 2005 02:01:37 +0100
> | Lines: 114
> | MIME-Version: 1.0
> | Content-Type: multipart/alternative;
> | boundary="----=_NextPart_000_000A_01C5C950.B80A5A20"
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
> | Message-ID: <OKojZhUyFHA.2***@TK2MSFTNGP09.phx.gbl>
> | Newsgroups: microsoft.public.dotnet.languages.csharp
> | NNTP-Posting-Host: client-82-14-66-221.brnt.adsl.virgin.net 82.14.66.221
> | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
> | Xref: TK2MSFTNGXA01.phx.gbl
> microsoft.public.dotnet.languages.csharp:126653
> | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
> |
> | I'm developing an application on the smartphone.  To reduce the size of
> the application i'm using panels where appropriate instead of forms.  As a
> result of the design, I need to have different context menus on one form.
> I had tried to declare two MainMenu items and then simply switch the
> display accordingly.   eg.
> | public void displayPanel1(){
> | this.Menu = this.mainMenu1;  //
> | this.Refresh();
> | }
> | public void displayPanel2(){
> | this.Menu = this.mainMenu2;
> | this.Refresh();
> | }
> | but this throws a not supported exception.  I am aware that smartphone
> allows only one menuitem on the left softkey and multiple on the right
> softkey.  I have adhered to this policy.   I then tried to have one
> MainMenu and just clear all menuitems then populate the menu depending on
> which panel i display.
> | this.rightmenuItem.MenuItems.Clear();
> | this.rightmenu.MenuItems.Add(this.next_menuItem);
> | this.rightmenu.MenuItems.Add(this.exit_menuItem);
> | Again this throws a Not Supported Exception when i try to Clear the list
> of MenuItems.  I have tried the code on Pocket Pc and this works, how can
> i
> display menus on the smartphone?  I have found things on google, but that
> is where people have placed menuItems on the left hand side.
> | Any help would be appreciated.
> | Davie.
> |
>
Author
6 Oct 2005 6:03 AM
Kevin Yu [MSFT]
Hi Davie,

As far as I know, this is a limitation of .NET compact framework on
SmartPhone. Can you try to delete the mainmenu and recreate it? Please
check the following thread for reference.

http://groups.google.com/group/microsoft.public.smartphone.developer/browse_
frm/thread/8c676f112fcca1a3/a98db4c74fb7f211?lnk=st&q=smartphone+menuitems+c
lear&rnum=3#a98db4c74fb7f211

http://groups.google.com/group/microsoft.public.smartphone.developer/browse_
thread/thread/78fca888977acea4/f29db9663a6902ca?lnk=st&q=smartphone+menuitem
s+clear&rnum=2&hl=en#f29db9663a6902ca

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Author
10 Oct 2005 2:58 AM
Davie
Many thanks.


Show quoteHide quote
"Kevin Yu [MSFT]" <v-k***@online.microsoft.com> wrote in message
news:o0JC1ujyFHA.1360@TK2MSFTNGXA01.phx.gbl...
> Hi Davie,
>
> As far as I know, this is a limitation of .NET compact framework on
> SmartPhone. Can you try to delete the mainmenu and recreate it? Please
> check the following thread for reference.
>
> http://groups.google.com/group/microsoft.public.smartphone.developer/browse_
> frm/thread/8c676f112fcca1a3/a98db4c74fb7f211?lnk=st&q=smartphone+menuitems+c
> lear&rnum=3#a98db4c74fb7f211
>
> http://groups.google.com/group/microsoft.public.smartphone.developer/browse_
> thread/thread/78fca888977acea4/f29db9663a6902ca?lnk=st&q=smartphone+menuitem
> s+clear&rnum=2&hl=en#f29db9663a6902ca
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
Author
11 Oct 2005 2:45 AM
Kevin Yu [MSFT]
You're welcome.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Bookmark and Share