|
Christian Graus wrote: If you use F2 to rename the file in the solution Explorer, I think it will rename the class for you. Yo ucan also right click on the name and rename it via the refactor menu. Finally, you can just do a global search and replace.
Only works on a "modern" IDE. VS 2003 didn't have the fancy refactoring - this was introduced in 2005.
|
|
|
|
|
Which is why I also said 'search and replace' :p
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Override CreateParams, and set the class name yourself. Not sure if it will give you an exact name though, but it's worth a try.
www.andrewvos.com
|
|
|
|
|
Hmm. Doesn't work.
www.andrewvos.com
|
|
|
|
|
Thanks.
That is no answer
|
|
|
|
|
If you want to use SendMessage to send something to a window, do what was mentioned above.
Maybe inherit a NativeWindow, and set the caption to something like "My Special Window". Then you can use FindWindow("My Special Window") to find the handle of the window you want to SendMessage to. All you need to do then is override WndProc in the NativeWindow.
Have a look at FindWindow on pinvoke.net.
www.andrewvos.com
|
|
|
|
|
private void AutoComplete_DGV_EditingControlShowing(object sender,DataGridViewEditingControlShowingEventArgs e)
{
TextBox textBx = e.Control as TextBox;
if (textBx != null && /*
* Only if the column index of the current cell is
* "The one for which we need autocomplete functionality"
*/
((DataGridView)sender).CurrentCell.ColumnIndex == 1)
{
/*
* "BackGround COLORING" :
* Cleaning the existing EventHandlers
*/
textBx.TextChanged -=
new EventHandler(AutoComplete_OnSelectionSetBackColor);/*
* "BackGround COLORING" :
* Adding new event handler.
*/
textBx.TextChanged +=
new EventHandler(AutoComplete_OnSelectionSetBackColor);
//Populating the 'custom datasource' values.
textBx.AutoCompleteCustomSource.AddRange(new string[ {
"valuea","valueab","valueabc",
"x","xyz","xyz123",
"a12","a123","a123def",
"d","def","defg"});
//Setting to Suggest mode.
textBx.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
//Setting the source to the above created custom suggest datasource.
textBx.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
}
else if (textBx != null /*if the column index of the current cell NOT "The one for which we need autocomplete functionality"
* Resetting the edited control's Autocomplete flags
*/)
{
/* "BackGround COLORING" :
* Cleaning the existing EventHandlers
*/
textBx.TextChanged -=
new EventHandler(AutoComplete_OnSelectionSetBackColor);/* Note: The following code ensures that if the column which is being edited.
* is NOT "THE AUTOCOMPLETE ONE" then is undo the effects for the Autocomplete edit settings
*/
textBx.AutoCompleteCustomSource.Clear();
textBx.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.None;textBx.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.None;
}
}
Can we do same with InfragisticsGridControl[ultraGrid1]...
Please provide me code...
Thanks...
modified on Tuesday, June 10, 2008 9:04 AM
|
|
|
|
|
3rd party specific questions should be asked on the appropriate site - in this case Infragistics. You are more likely to get help there - provided you have a legitimate version of the controls.
|
|
|
|
|
I am trying to make an AutoComplete Combobox in InfragisticsGridControl...
Please provide me some sample code...If its possible..
Thanks
|
|
|
|
|
hi
i want to create new Measuring Unit from Main units (like : meter,kilo gram,...) by formula, for example i want to create new unit from this formula :
unit1 = (1.25 * Meter) / 100
or
unit2 = ((1.25 * Meter) / 100) + 91
but i don't know how to do, do i need Regex ? if yes, can u give me a useful articles or sources ?
thanks.
|
|
|
|
|
I have no idea where you expect to need regex here, do you want to pull numbers out of a string ? Do you want people to type in the formula ? In both those cases, yes, some form of string mashing is required. Is that what you meant ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
thanks Christian Graus
yes, i want to peaople type in formula textBox to create new formula, can u give me a useful article ?
|
|
|
|
|
Hi! I want to know how can I copy item from one listview to another listview. Thanks ahead
|
|
|
|
|
ListViewItem L_Copy = L_Selected.Clone() as ListViewItem;
Where L_Selected is the selected ListViewItem
Have Fun
Never forget it
|
|
|
|
|
ok..but If I have selected multiple items from the first listview...and then I want to put them all in the second list view...how I need to do that?
|
|
|
|
|
SelectedItems property returns all the items that are selected. You can iterate over them and copy one by one.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I know, I tried few times, but simply it doesn't want to move from one listview to another, I am trying something like this:
example:
listview2.items.add = listview1.selecteditems;
can you please give me some better way to solve this, it's really important for me...Thx ahead
|
|
|
|
|
Do you want to copy items or move items?
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I want to move...but if you want you can show me both examples, thanks a lot
|
|
|
|
|
|
Here u Go :
List<listviewitem> NewList = new List<listviewitem>();
CurrentListView.SelectedItems.CopyTo(NewList.ToArray(), 0);
ListView NewListView = new ListView();
NewList.AddRange(NewList.ToArray());
Have Fun
Never forget it
|
|
|
|
|
ok...so this is how I did it, according to your advices:
List<listviewitem> NewList = new List<listviewitem>();
lvFiles.SelectedItems.CopyTo(NewList.ToArray(), 0);
lvAccepted.Items.AddRange(NewList.ToArray());
and I got ArgumentException at the second line:
"Destination array was not long enough. Check destIndex and length, and the array's lower bounds."
Any help??
|
|
|
|
|
Sure,
Here u GO :
List<ListViewItem> arr = new List<ListViewItem>(listView1.SelectedItems.Count);
foreach (ListViewItem LVI in listView1.SelectedItems)
{
arr.Add(LVI.Clone() as ListViewItem);
}
listView2.Items.AddRange(arr.ToArray());
this Works Fine, i've Check It
Have Fun
Never forget it
|
|
|
|
|
thx...I am done for today, but I will check tomorrow for sure, have a nice evening
|
|
|
|
|