Click here to Skip to main content
13,003,934 members (123,788 online)
Rate this:
Please Sign up or sign in to vote.
See more:
When the mouse select an item in a listbox the item is surrounded by spotted rectangle ,even after making Selection Mode "None" can I remove this box !!!
I am working with C# windows forms not WPF
like this

.  I am a student in biology lab          -   .
Posted 11-Sep-12 14:48pm
Updated 12-Sep-12 1:43am
Sergey Alexandrovich Kryukov 11-Sep-12 20:59pm
What do you call a "spotted rectangle" should really be defined. The "pointed box" does not add anything to understanding of what it is, only confuses.
Perhaps, this is a problem of English usage, then you can get an idea what "spotted" and "pointed" mean:
For example, "spotted salamander" means with spots on its skin:
and "pointed hat" (in the form of a sharp cone, as if it "points" upward like an arrow):

Not close to what you mean? Then you should use different word and provide exact definitions. :-)

Sergey Alexandrovich Kryukov 11-Sep-12 21:05pm
Besides, you should point (pun unintended) to an exact type of "ListBox". There are different but similar types named like this. In all cases, you need to tag (should I have said "spot"? :-) your application type or the UI library in use (WPF? Forms? Silverlight? ASP.NET? what?).

Please, no offense. This forum and many members including myself belong to different cultures and are very tolerant to mistakes in English, as well as most native English-speaking members; there is nothing terrible in making them; it's just some things should be formulated more or less accurately to make things understandable and avoid unwanted waste of time.

Manfred R. Bihy 14-Sep-12 5:10am
Did my solution help you? If it did I'd appreciate a vote on it and if your problem was solved also accept it as a solution.
Thank you!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

What you are most probably talking about is the dotted line around the selection of a listbox. There is a discussion on SO that talks about how it can be achieved to omit having that dotted border:

WPF: Remove dotted border around focused item in styled listbox[^]. Refer to Jobi Joys answer.


— Manfred
Al-Samman Mahmoud 14-Sep-12 11:37am
Sorry for being late
and thank U very much :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 12 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100