How do I program the context menu of an undo/redo toolbar button drop down
menu to behave like the vs.net undo where all previous menu items are
selected as the user moves the mouse pointer down the list?
Thanks,
Dennis 6 2296
Never mind, I figured it out.
Although I still do wonder how to get the item at the bottom of the dropdown
list that keeps track of how many items are selected.
Dennis
"Dennis C. Drumm" <de*******@prim acode.com> wrote in message
news:eP******** ******@TK2MSFTN GP12.phx.gbl... How do I program the context menu of an undo/redo toolbar button drop down menu to behave like the vs.net undo where all previous menu items are selected as the user moves the mouse pointer down the list?
Thanks,
Dennis
Hi Dennis,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know how to get the last
item selected on a combo box to get the count of items selected. If there
is any misunderstandin g, please feel free to let me know.
I think we can use ComboBox.Select edIndex to get the current selected item.
Since the items before the selected one are all selected, the count equals
to SelectedIndex +1.
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Kevin
I wanted to make sure that the all items in the list wouold be automatically
slected as they are in the undo dropdown button in vs.net. I believe that
can probably be done with the MenuItem.Select event.
The other issue was how to get the text at the bottom of the dropdown that
shows the count. I know how to get the count, what is a mistry is how to get
the centered text at the bottom of the dropdown.
Thanks,
Dennis
"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:aC******** ******@cpmsftng xa10.phx.gbl... Hi Dennis,
First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to know how to get the last item selected on a combo box to get the count of items selected. If there is any misunderstandin g, please feel free to let me know.
I think we can use ComboBox.Select edIndex to get the current selected item. Since the items before the selected one are all selected, the count equals to SelectedIndex +1.
HTH.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Kevin:
How do I use a ComboBox in place of a ContextMenu for the undo toolbar
button?
thanks,
Dennis
"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:aC******** ******@cpmsftng xa10.phx.gbl... Hi Dennis,
First of all, I would like to confirm my understanding of your issue. From your description, I understand that you need to know how to get the last item selected on a combo box to get the count of items selected. If there is any misunderstandin g, please feel free to let me know.
I think we can use ComboBox.Select edIndex to get the current selected item. Since the items before the selected one are all selected, the count equals to SelectedIndex +1.
HTH.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights."
Hi Dennis,
Could you let me know how you implement the undo button? Are you using a
context menu or a combo box?
As far as I know, a ComboBox does not support multiple selection. It means
that we cannot make all the above items selected when the bottom on is
clicked. We can only get the item selected using ComboBox.Select edItem. If
you need to get the text directly, use ComboBox.Select edText.
To get the text of the bottom item, use the following:
this.comboBox1. Items[this.comboBox1. Items.Count-1].ToString();
HTH.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
Kevin,
Thanks for the comments. It turns out, I need to impliment a user control to
get the functionality I am looking for.
Dennis
"Kevin Yu [MSFT]" <v-****@online.mic rosoft.com> wrote in message
news:V4******** ******@cpmsftng xa10.phx.gbl... Hi Dennis,
Could you let me know how you implement the undo button? Are you using a context menu or a combo box?
As far as I know, a ComboBox does not support multiple selection. It means that we cannot make all the above items selected when the bottom on is clicked. We can only get the item selected using ComboBox.Select edItem. If you need to get the text directly, use ComboBox.Select edText.
To get the text of the bottom item, use the following: this.comboBox1. Items[this.comboBox1. Items.Count-1].ToString();
HTH.
Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: babylon |
last post by:
any facilities in csharp that can help me implmenting undo/redo in my
application?
thx
|
by: Mad Joe |
last post by:
I'm using a richTextBox for editing a source code (with Syntax Highlighting)
of my own programming language...
How come that myRichTextBox doesn't respond to Undo/Redo functions by using
default shortcut keys, or even programaticaly (by using Button_onClick
event)?
if(myRichTextBox.CanUndo == true)
{
myRichTextBox.Undo();
}
|
by: Christian H |
last post by:
Hello,
I've tried to find information about how to implement an Undo/Redo pattern.
This article describes such a pattern:
http://www.codeproject.com/csharp/PcObjectUndo.asp , but is a little bit to
narrow, since it only can handle 1 object, and since it only works on
properties.
What if you , in an application, have more than 1 object , and you want to
use undo/redo on them?
|
by: Dennis C. Drumm |
last post by:
Is there a way to modify the standard context menu shown when someone right
clicks in a windows text box and that would work for all open windows
applications?
The standard context menu for a text box has 6 items, undo, cut, copy,
paste, delete and select all. I would like to add one additional paste menu
that opens a new sub menu with several optional text items that could be
pasted. The items would be populated by my program but...
|
by: nail |
last post by:
Hi.
I have this xml file:
<menu>
<header caption="File">
<item header="File" caption="New File"></item>
<item header="File" caption="Open File"></item>
<item header="File" caption="Close File"></item>
<item header="File" caption="New Web Site"></item>
<item header="File" caption="New Project"></item>
</header>
| |
by: goRide |
last post by:
Hi,
I'm looking of a way (preferred - a ready class or dll) to customize
the context menu.
many application has more controls inside the context menu (like
textbox, sliders, checkbox, panel etc').
is there a way making this without writing my own context menu
(meaning, popup form or something) ?
Please don't post commercial products to this topic
thanks.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |