Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
GeneralDead Keys Pin
Loveday7821-Jul-05 4:25
Loveday7821-Jul-05 4:25 
GeneralRe: Dead Keys Pin
LongRange.Shooter21-Jul-05 4:39
LongRange.Shooter21-Jul-05 4:39 
GeneralRe: Dead Keys Pin
Loveday7821-Jul-05 5:00
Loveday7821-Jul-05 5:00 
GeneralRe: Dead Keys Pin
Daniel Turini21-Jul-05 4:58
Daniel Turini21-Jul-05 4:58 
GeneralRe: Dead Keys Pin
Loveday7821-Jul-05 5:04
Loveday7821-Jul-05 5:04 
GeneralSearching for drag and drop item in listbox Pin
PHDENG8121-Jul-05 4:23
PHDENG8121-Jul-05 4:23 
GeneralRe: Searching for drag and drop item in listbox Pin
LongRange.Shooter21-Jul-05 4:37
LongRange.Shooter21-Jul-05 4:37 
GeneralRe: Searching for drag and drop item in listbox Pin
PHDENG8121-Jul-05 5:28
PHDENG8121-Jul-05 5:28 
I am populating the listbox with string. This what I have:

private void treeView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
//if(treeView1.SelectedNode.Nodes)

if(e.Button == MouseButtons.Right)

contextMenuParent.Show(this,new Point(e.X,e.Y));
treeView1.SelectedNode = treeView1.GetNodeAt (e.X ,e.Y );

}


private void listBox1_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
{

string str = "";

// Get the string from the data that was dragged
string s = (string)e.Data.GetData(str.GetType());
s = s.Substring(s.IndexOf(":")+ 1).Trim();

// Drop the string in the listbox
listBox1.Items.Add(s);

//textBox2.Text = s;

treeView1.SelectedNode.ForeColor = Color.Red;

Position.X = e.X;
Position.Y = e.Y;

Position = listBox1.PointToClient(Position);

}

Then I have a search function that takes the selecteditem's text from the listbox and looks for the text in the listview and makes the necessary changes.

If I add it like this:

listBox1.Items.Add(treeView1.SelectedNode.Text);

It works fine.

Thanks again for all of your help.



PD
GeneralRe: Searching for drag and drop item in listbox Pin
PHDENG8121-Jul-05 5:38
PHDENG8121-Jul-05 5:38 
QuestionHow to verify user input during application installation? Pin
sparks_lu21-Jul-05 4:14
sparks_lu21-Jul-05 4:14 
AnswerRe: How to verify user input during application installation? Pin
Alomgir Miah21-Jul-05 6:29
Alomgir Miah21-Jul-05 6:29 
GeneralIF / WHILE questions Pin
WetRivrRat21-Jul-05 3:58
WetRivrRat21-Jul-05 3:58 
GeneralRe: IF / WHILE questions Pin
LongRange.Shooter21-Jul-05 4:28
LongRange.Shooter21-Jul-05 4:28 
GeneralRe: IF / WHILE questions Pin
WetRivrRat21-Jul-05 4:36
WetRivrRat21-Jul-05 4:36 
GeneralRe: IF / WHILE questions Pin
Dave Kreskowiak21-Jul-05 4:44
mveDave Kreskowiak21-Jul-05 4:44 
GeneralRe: IF / WHILE questions Pin
WetRivrRat21-Jul-05 4:49
WetRivrRat21-Jul-05 4:49 
GeneralRe: IF / WHILE questions Pin
LongRange.Shooter21-Jul-05 4:48
LongRange.Shooter21-Jul-05 4:48 
QuestionGetting my own memory stats? Pin
LongRange.Shooter21-Jul-05 3:54
LongRange.Shooter21-Jul-05 3:54 
AnswerRe: Getting my own memory stats? Pin
Dave Kreskowiak21-Jul-05 4:42
mveDave Kreskowiak21-Jul-05 4:42 
GeneralReusable Toolbox Images Pin
dirkhelmet21-Jul-05 3:27
dirkhelmet21-Jul-05 3:27 
GeneralRe: Reusable Toolbox Images Pin
LongRange.Shooter21-Jul-05 3:59
LongRange.Shooter21-Jul-05 3:59 
GeneralRe: Reusable Toolbox Images Pin
dirkhelmet21-Jul-05 4:16
dirkhelmet21-Jul-05 4:16 
GeneralRe: Reusable Toolbox Images Pin
LongRange.Shooter21-Jul-05 4:26
LongRange.Shooter21-Jul-05 4:26 
GeneralIcon in ListView item Pin
george ivanov21-Jul-05 2:41
george ivanov21-Jul-05 2:41 
GeneralRe: Icon in ListView item Pin
Alomgir Miah21-Jul-05 3:33
Alomgir Miah21-Jul-05 3:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.