Lost Password?


  #1 (permalink)  
Old 05-22-2006, 01:53 PM
Jordan's Avatar   
Jordan Jordan is offline
Administrator
 
Join Date: Nov 2005
Location: Hendersonville, NC
Posts: 9,648
Last Blog:
PHP Objects, Patterns,...
Rep Power: 20
Jordan is just really niceJordan is just really niceJordan is just really niceJordan is just really nice
Send a message via ICQ to Jordan Send a message via AIM to Jordan Send a message via MSN to Jordan
Default ListBox select item by right-clicking

Here is how to select an item in a listbox when right-clicking:

C++
Code:
private: System::Void listBox1_MouseDown(System::Object^  sender, System::Windows::Forms::MouseEventArgs^  e) {
          if (e->Button == System::Windows::Forms::MouseButtons::Right) {
          listBox1->SelectedIndex = listBox1->IndexFromPoint(e->X, e->Y);
 }
					
			 }
C#
Code:
private void LST_BX_MouseDown(object sender, MouseEventArgs e) {
   if(e.Button == MouseButtons.Right)
      LST_BX.SelectedIndex = LST_BX.IndexFromPoint(e.X, e.Y);
}
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog
The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 05-24-2006, 06:58 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

Nice code. I've never really thought about right-clicking and selecting. It seems like a feature that should already be imbedded int he code.
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-27-2006, 04:50 PM
Void's Avatar   
Void Void is offline
Programming Expert
 
Join Date: Jun 2006
Posts: 411
Rep Power: 12
Void is on a distinguished road
Default

You would think this would be default code.....
__________________
Void
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu Item options. aravot easyContact 3 12-13-2007 03:27 PM
Select options catbollu ASP, ASP.NET and Coldfusion 3 05-23-2007 04:06 PM
Using one Alias for mutiple columns in a SELECT statement reachpradeep Database & Database Programming 0 03-05-2007 08:21 AM


All times are GMT -5. The time now is 05:32 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads