|
||||||
| Managed C++ Visual Studio .NET managed C++ Topics |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
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);
}
}
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! |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
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 |
| 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 |