Click here to Skip to main content
15,926,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataSet Pin
Colin Angus Mackay24-Jun-04 22:23
Colin Angus Mackay24-Jun-04 22:23 
GeneralRe: DataSet Pin
amatyasik25-Jun-04 2:08
amatyasik25-Jun-04 2:08 
GeneralRe: DataSet Pin
Dave Kreskowiak25-Jun-04 5:03
mveDave Kreskowiak25-Jun-04 5:03 
GeneralTo give color to a row of datagrid Pin
HowRU24-Jun-04 22:15
HowRU24-Jun-04 22:15 
GeneralRe: To give color to a row of datagrid Pin
Heath Stewart25-Jun-04 4:31
protectorHeath Stewart25-Jun-04 4:31 
Generalc# and visual foxpro database Pin
cmarmr24-Jun-04 18:53
cmarmr24-Jun-04 18:53 
GeneralRe: c# and visual foxpro database Pin
Heath Stewart25-Jun-04 4:30
protectorHeath Stewart25-Jun-04 4:30 
GeneralDrawing Problem Pin
rog103924-Jun-04 18:47
rog103924-Jun-04 18:47 
Please forgive me for being a complete amaeteur about this stuff. I really dont know what I'm doing. The problem I am having is with my scrollable control I am making. Here is the code below for the onPaint.

protected override void OnPaint(PaintEventArgs e)
{
// TODO: Add UserControl1.OnPaint implementation
base.OnPaint (e);

System.Drawing.Graphics g = e.Graphics;
//Draw the underlying background, including alternating row colors.

#region Draw the row backgrounds
//Brushes for the row backgrounds
System.Drawing.SolidBrush backcolor = new SolidBrush( this.RowBackgroundColor );
System.Drawing.SolidBrush altbackcolor = new SolidBrush( this.RowAlternatingBackgroundColor );
//Now draw the rows backgrounds.
float startpos = 0;
bool alternate = true;
int controlwidth = this.ClientRectangle.Width;
while ( startpos < this.ClientRectangle.Height )
{
if( alternate == true )
{
g.FillRectangle( backcolor, 0, startpos, controlwidth, this.RowHeight );
alternate = false;
}
else
{
g.FillRectangle( altbackcolor, 0, startpos, controlwidth, this.RowHeight );
alternate = true;
}
startpos += this.RowHeight;
}
backcolor.Dispose();
altbackcolor.Dispose();
#endregion

}

My problem is this. I put this control on a blank form and then put a listbox inside this control and made the listbox longer than the control so scoll bars would appear. When I run the form everything appears normal at first. However, once I scroll, the background, that should be just alternating colors does not get updated. One color will just take up the rest of the space on the bottom of the control. I hope that makes sense, it's kind of hard to explain. Any help would be appreciated. Thanks

Paul Rogero
GeneralRe: Drawing Problem Pin
Heath Stewart25-Jun-04 4:25
protectorHeath Stewart25-Jun-04 4:25 
GeneralRe: Drawing Problem Pin
Karl 200027-Jun-04 9:19
Karl 200027-Jun-04 9:19 
GeneralThe Thread Security Of It All Pin
MKlucher24-Jun-04 18:07
MKlucher24-Jun-04 18:07 
GeneralRe: The Thread Security Of It All Pin
LongRange.Shooter25-Jun-04 2:52
LongRange.Shooter25-Jun-04 2:52 
GeneralRe: The Thread Security Of It All Pin
Heath Stewart25-Jun-04 4:03
protectorHeath Stewart25-Jun-04 4:03 
GeneralRe: The Thread Security Of It All Pin
Heath Stewart25-Jun-04 4:10
protectorHeath Stewart25-Jun-04 4:10 
GeneralRe: The Thread Security Of It All Pin
MKlucher25-Jun-04 8:02
MKlucher25-Jun-04 8:02 
GeneralRe: The Thread Security Of It All Pin
Heath Stewart25-Jun-04 8:32
protectorHeath Stewart25-Jun-04 8:32 
Questionspeed of Dataset and DataReader? Pin
jzb24-Jun-04 16:33
jzb24-Jun-04 16:33 
AnswerRe: speed of Dataset and DataReader? Pin
Colin Angus Mackay24-Jun-04 22:20
Colin Angus Mackay24-Jun-04 22:20 
Generalquestion of ImageList Pin
jzb24-Jun-04 16:28
jzb24-Jun-04 16:28 
GeneralRe: question of ImageList Pin
bneacetp24-Jun-04 21:27
bneacetp24-Jun-04 21:27 
GeneralRe: question of ImageList Pin
Dave Kreskowiak25-Jun-04 4:46
mveDave Kreskowiak25-Jun-04 4:46 
Question.NET Remoting, Client side reference server side? then how distribute? Pin
fayth24-Jun-04 16:11
fayth24-Jun-04 16:11 
AnswerRe: .NET Remoting, Client side reference server side? then how distribute? Pin
Xiangyang Liu 刘向阳24-Jun-04 16:54
Xiangyang Liu 刘向阳24-Jun-04 16:54 
GeneralRe: .NET Remoting, Client side reference server side? then how distribute? Pin
Heath Stewart25-Jun-04 3:59
protectorHeath Stewart25-Jun-04 3:59 
GeneralRe: .NET Remoting, Client side reference server side? then how distribute? Pin
Xiangyang Liu 刘向阳25-Jun-04 15:41
Xiangyang Liu 刘向阳25-Jun-04 15:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.