473,383 Members | 1,877 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,383 software developers and data experts.

DataGrid OnPaint/? -How Do I Draw A GDI Type Circle On Top Of A DataGrid

I want to put a GDI type circle on top of my DataGrid (actually I want to put GDI colored border around the entire selected row, but if I can figure out how to put a circle on top of it I can do the border)



My main form uses a MyDataGrid. instance as the folowing code from MyDataGrid.cs



public class MyDataGrid : DataGrid

..

protected override void OnPaint(PaintEventArgs e)

{

base.OnPaint (e);

}



On my small datagrid it hits this code about a 100 or so times, it seems it's painting each cell, headers, etc individually with all that TableStyles stuff.



Where in my code would I do the circle painting thing. Or, where in my code am I after it finishes with this OnPaint. Is this done in my main form, or do I need to do it somewhere in MyDataGrid.cs that it hits after it's done with the OnPaint?





Nov 21 '05 #1
2 1126
Nov 21 '05 #2
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: NewSun | last post by:
I draw a grid on a panel.And panel1' property AutoScroll is set true.When HScroollBar is Scroolling,the grid is error. I have rewritten the mathod of WndProc.But the effect is unexpected. How can...
11
by: Sagaert Johan | last post by:
I have made a custom control that draws a rectangle when the mouse is down, and does nothing when the mouse is up. I set/reset a flag in MouseDown/Mouse up and use this to do the drawing in the...
8
by: Mark Johnson | last post by:
Using: VS 2003 NET C# for Framework and Framework Compact Trying : Moving a Card (Bitmap) as in Solitare (PC + WinCe) Version on OnMouseMove Problem : The affected drawing Area by Invalidate (or...
5
by: Ron Vecchi | last post by:
I have a custyom control that has a property which wraps a collection. When I add controls to the collection the OnPaint method of these newly added controls never get fired. But if I take the...
2
by: Marge Inoferror | last post by:
I'm drawing images to scale based on the size of the window. I have my calls to DrawImage in an OnPaint override. I use Visual C#.NET. It repaints just fine when the window is resized. It does...
3
by: jrhoads23 | last post by:
I have been wondering this for some time. If I create my own class inherited from an existing class or create a user control, should I be overriding the OnFontChanged method (or similar) or...
3
by: Chan | last post by:
Invalidate() is a member of System.Windows.Forms.Form. It marks an area of the client window as invalid and, therefore, in need of repainting, and then makes sure a Paint event is raised. But...
20
by: BB | last post by:
Hello all, I am trying to override OnPaint in a custom textbox control (so I can drawstring a caption, etc.). In the code below, I get the "painting the form" message as expected, but not the...
1
by: sean | last post by:
I'm trying to create "rubber-band" rectangles by overriding the OnPaint method to place rectangles on top of all graphic controls, but when I call Me.Invalidate() (when the user moves the mouse),...
2
by: hgarg | last post by:
The onpaint() is getting called before calculating the required parameters by listBox1_SelectedIndexChanged function. I tried calling it at the end of this function. But of no use. Due to this issue...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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?
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...

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.