By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,186 Members | 1,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,186 IT Pros & Developers. It's quick & easy.

MenuItems.Clear() Problem

P: n/a
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.

Nov 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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" <Da***@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: <OK**************@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!TK2MSFT NGP09.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.
|

Nov 17 '05 #2

P: n/a
Thanks once again for your assitance Steven. :-)
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:R8**************@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" <Da***@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: <OK**************@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!TK2MSFT NGP09.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.
|

Nov 17 '05 #3

P: n/a
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/micro...eloper/browse_
frm/thread/8c676f112fcca1a3/a98db4c74fb7f211?lnk=st&q=smartphone+menuitems+c
lear&rnum=3#a98db4c74fb7f211

http://groups.google.com/group/micro...eloper/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."

Nov 17 '05 #4

P: n/a
Many thanks.
"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:o0**************@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/micro...eloper/browse_
frm/thread/8c676f112fcca1a3/a98db4c74fb7f211?lnk=st&q=smartphone+menuitems+c
lear&rnum=3#a98db4c74fb7f211

http://groups.google.com/group/micro...eloper/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."

Nov 17 '05 #5

P: n/a
You're welcome.

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

Nov 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.