473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Selectable User-Drawn Control

2
Hi all.
I've built a class based on "Control" and I want this object of mine to be
selectable. I believe that, by default, Control is non-selectable so I used
this.SetStyle(ControlStyles.Selectable, true);

And it works fine when I use TAB key, but when I click on my object, the
focus remains on the current object.

What am I doing wrong?

TIA
Jan 7 '09 #1
2 3232
tlhintoq
3,525 Expert 2GB
One though: Set the "Click" event of your control to this.Focus();
Jan 9 '09 #2
DMVC
2
Thanks, tlhintoq.
I've found a nice way in another thread.

if (this.CanSelect) this.Select();

I used this on override OnMouseDown
Jan 9 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Oz Mortimer | last post by:
Hi, Is there any way that I can create a selectable image? I have tried using List and ChoiceGroup but this doesnt seem to give the results I require!. I want to create a menu list using...
13
by: MLH | last post by:
I have a number of reports that are essentially black 'n white prepared forms (picture an IRS form 1040). The data fields are overlaid onto the report fields in the correct positions and I would...
8
by: Gary Owsiany | last post by:
Ok, the silence is deafening. I posted my selectable sort application to show that you can use the IComparable Interface just as effectively as the IComparer Interface and the feedback has been,...
3
by: Alex | last post by:
What I want to do is enable a region to draw a circle(onclick and draw a circle or an icon image), and this circle is selectable.... any easy way to do that?
4
by: shortbackandsided.removeme | last post by:
I want to present users with a choice of mono, text only print or colour including images. Can I somehow offer on the web-page the ability for the user to select the print style sheet?
40
by: Paul Davis | last post by:
Hi all, I'm building some style sheets and trying to play the old game of balancing designer pixel perfection and still allowing users to adjust their font sizes. The compromise I've made with the...
5
by: Lee | last post by:
Hi, Using the propertygrid, is it possible to have a user selectable 'unit of measure' for a field. For example, I am looking at using a propertygrid for defining inputs into a calculation. ...
1
by: Homer | last post by:
Hi, I used a template for my first Web application. I made a few changes to the layer thru its css file. The problem that has been vexing me is the vertical spacing for each navigation menu...
0
by: nickmarkham | last post by:
Hi, I have 'localized' the button images in my web app by using an HTTP handler file for each image so the correct langauge imagebutton can be loaded depending on the users language. In the...
1
by: dbphoto | last post by:
I've created a selectable layer and inputted the action script into the button but the layer appears on the main layer and is not selectable. Any ideas?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.