We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Copy/Paste in ComboBoxBarItem

Thread ID:

Created:

Updated:

Platform:

Replies:

71663 Feb 8,2008 04:42 PM UTC Jul 6,2011 06:24 AM UTC Windows Forms 9
loading
Tags: Tools
Mark Atkinson
Asked On February 8, 2008 04:42 PM UTC

I'm using a ComboBoxBarItem with an editable listbox and adding that ComboBoxBarItem to a PopupMenu.

Is it possible to implement clipboard copy/paste (Ctrl+V, etc) to the textbox part of the ComboBoxBarItem? I've tried a couple of things like handling the KeyDown event for the ListBox property (of the ComboBoxBarItem) and I also handled the TextBoxBound event of the control thinking that I might be able to do something there but the event never seems to fire.

I'm using 5.2 libraries.

Thanks,
Mark




Rajagopal [Syncfusion]
Replied On February 8, 2008 11:35 PM UTC

Hi Mark,

You need to get hold of the TextBox inside the ComboboxBarItem from the TextBoxBound event of the comboBoxBarItem. Then handle the KeyDown event of the textbox and do your paste there when Ctrl+V is pressed.

// TextBoxBound event of the comboBoxBarItem
void comboBoxBarItem1_TextBoxBound(object sender, Syncfusion.Windows.Forms.Tools.XPMenus.TextBoxBoundEventArgs args)
{
args.TextBox.KeyDown += new KeyEventHandler(TextBox_KeyDown);
}

void TextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.V)
{

}
}

Let me know if you have any questions.

Regards,
Rajagopal


Mark Atkinson
Replied On February 9, 2008 12:06 AM UTC

I tried exactly that because I saw some code in a different post and the TextBoxBound event never seemed to fire (see my original post).
Is it because the ComboBoxBarItem is in a Popup menu instead of some other kind of container or toolstrip menu?

>Hi Mark,

You need to get hold of the TextBox inside the ComboboxBarItem from the TextBoxBound event of the comboBoxBarItem. Then handle the KeyDown event of the textbox and do your paste there when Ctrl+V is pressed.

// TextBoxBound event of the comboBoxBarItem
void comboBoxBarItem1_TextBoxBound(object sender, Syncfusion.Windows.Forms.Tools.XPMenus.TextBoxBoundEventArgs args)
{
args.TextBox.KeyDown += new KeyEventHandler(TextBox_KeyDown);
}

void TextBox_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control && e.KeyCode == Keys.V)
{

}
}

Let me know if you have any questions.

Regards,
Rajagopal




Mark Atkinson
Replied On February 19, 2008 01:52 AM UTC

Just checking in. Any other ideas on this?


Administrator [Syncfusion]
Replied On February 20, 2008 08:24 AM UTC

Hi Mark,

Thank you for your update.

I am afraid that I was not able to reproduce the issue mentioned here. Could you please provide us the simple sample that illustrates this, so that it would be more helpful for us to sort out the cause of issue and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima


Administrator [Syncfusion]
Replied On December 5, 2008 05:33 PM UTC

It's been a while since I started this thread but the issue has come up again withour clients.
We're not able to paste text into a ComboBoxBarItem.
I've attached a zip file containing a sample that demonstrates the issue. I'm handling the TextBoxBound event as well as the KeyDown event for the TextBox but the KeyDown handler never seems to get invoked.

>Hi Mark,

Thank you for your update.

I am afraid that I was not able to reproduce the issue mentioned here. Could you please provide us the simple sample that illustrates this, so that it would be more helpful for us to sort out the cause of issue and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima





ComboBoxBarItem_c7b97ca2.zip

Administrator [Syncfusion]
Replied On December 11, 2008 06:27 PM UTC

Has anyone at Syncfusion been able to reproduce the issue using the attached sample (from the last message)?


Fathima Shalini P [Syncfusion]
Replied On December 12, 2008 10:58 AM UTC

Hi Mark,

We regret for the delay in getting back to you.

I am able to reproduce the issue that we are not able to paste the text into ComboBoxBarItem that is placed inside the PopupMenu. I have forwarded this to our developers for more analysis. We will get back to you on or before December 19th 2008 with more details.

Please let me know if any concerns.

Regards,
Fathima




Administrator [Syncfusion]
Replied On January 11, 2009 09:20 PM UTC

Any chance there might be a cofix for this in an upcoming release?

thanks,
Mark


Vallarasu S [Syncfusion]
Replied On July 6, 2011 06:24 AM UTC

Hi Mark,

I apologize for the long delay in getting back to you.

Please refer the attached Sample, which demonstrates how paste operation can be done in the ComboBoxBarItem, similarly you can have the copy and cut functions implemented as well.

Let me know if this helps.

Regards,
Vallarasu S.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;