Re: [Mono-dev] Bug in DataGridView.ScrollBars

2009-02-23 Thread Ivan N. Zlatev
2009/2/20 Marcelo Marques Inacio marceloina...@hotmail.com:
 Dear friends developers.

 The property ScrollBars.Vertical or ScrollBars.Horizontal in the
 DataGridView control is not working properly.
 The horizontal and vertical bar is always visible.
 Attached the following changes to correct operation.


I have fixed this in r127716, thanks. Please next time directly file
bugs for the WinForms component next time -
http://mono-project.com/Bugs .

-- 
Kind Regards,
Ivan N. Zlatev
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bug in DataGridView.ScrollBars

2009-02-23 Thread Petit Eric
2009/2/23 Ivan N. Zlatev cont...@i-nz.net:
 2009/2/20 Marcelo Marques Inacio marceloina...@hotmail.com:
 Dear friends developers.

 The property ScrollBars.Vertical or ScrollBars.Horizontal in the
 DataGridView control is not working properly.
 The horizontal and vertical bar is always visible.
 Attached the following changes to correct operation.


 I have fixed this in r127716, thanks. Please next time directly file
 bugs for the WinForms component next time -
 http://mono-project.com/Bugs .
Nothing to see with this ? : https://bugzilla.novell.com/show_bug.cgi?id=477748


 --
 Kind Regards,
 Ivan N. Zlatev
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list




-- 

Cordially.

Small Eric Quotations of the days:
---
If one day one reproaches you that your work is not a work of
professional, say you that:
Amateurs built the arch of Noah, and professionals the Titanic.
---

Few people are done for independence, it is the privilege of the powerful ones.
---

No key was wounded during the drafting of this message.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Bug in DataGridView.ScrollBars

2009-02-22 Thread Marcelo Marques Inacio

Dear friends developers. 

The property ScrollBars.Vertical or ScrollBars.Horizontal in the DataGridView 
control is not working properly. 
The horizontal and vertical bar is always visible. 
Attached the following changes to correct operation.



Marcelo Marques Inácio



marceloina...@hotmail.com

Telefones:
(62) 9969-3839 Celular




 



CC: mig...@ximian.com
From: mig...@novell.com
To: marceloina...@hotmail.com
Subject: Re: Bug in DataGridView.ScrollBars
Date: Thu, 19 Feb 2009 08:41:58 -0500

Hello Marcelo,


Would you mind sending this as a patch?


It would be even better if you post this to the 
mono-devel-list@lists.ximian.com for the patch to be reviewed and discussed.


Miguel.



On Feb 18, 2009, at 7:26 PM, Marcelo Marques Inácio wrote:



Dear Miguel; 

Sorry, but the correct code for the attribute scrollbars is that it was 
attached. 

thanks
 
 
Marcelo Marques Inácio



marceloina...@hotmail.com

Telefones:
(62) 9969-3839 Celular
 DataGridView.cs

_
Receba GRÁTIS as mensagens do Messenger no seu celular quando você estiver 
offline. Conheça  o MSN Mobile!
http://mobile.live.com/signup/signup2.aspx?lc=pt-br//#
// Atribute ScrollBars
//#

[DefaultValue (ScrollBars.Both)]
[Localizable (true)]
public ScrollBars ScrollBars
{
get { return scrollBars; }
set
{
if (!Enum.IsDefined(typeof(ScrollBars), value))
{
throw new InvalidEnumArgumentException(Invalid ScrollBars 
value.);
}

/// *** InvalidOperationException ***
/// The System.Windows.Forms.DataGridView is unable to
/// scroll due to a cell change that cannot be committed
/// or canceled.
///
scrollBars = value;
if (value == ScrollBars.Vertical | value == ScrollBars.Both)
{
verticalScrollBar.Visible = true;
}
else
{
verticalScrollBar.Visible = false;
}
if (value == ScrollBars.Horizontal | value == ScrollBars.Both)
{
horizontalScrollBar.Visible = true;
}
else
{
horizontalScrollBar.Visible = false;
}
}
}

//#
// Atribute ScrollBars
//#



//#
// Function OnPaint
//#

...

if (AutoSize) {
if (gridWidth  Size.Width || gridHeight  
Size.Height) {
Size = new Size(gridWidth, gridHeight);
}
}
else {
if (horizontalScrollBar.Visible  gridWidth  Size.Width)
{
horizontalVisible = true;
}
if (verticalScrollBar.Visible  gridHeight  Size.Height)
{
verticalVisible = true;
}
if (verticalScrollBar.Visible  horizontalScrollBar.Visible  
(gridHeight + horizontalScrollBar.Height)  Size.Height)
{
verticalVisible = true;
}
if (horizontalScrollBar.Visible  verticalScrollBar.Visible  
(gridWidth + verticalScrollBar.Width)  Size.Width)
{
horizontalVisible = true;
}
if (horizontalVisible) {
horizontalScrollBar.Minimum = 0;
horizontalScrollBar.Maximum = gridWidth;
horizontalScrollBar.SmallChange = 
Columns[first_col_index].Width;
int largeChange = ClientSize.Width - 
rowHeadersWidth;
if (largeChange = 0)
largeChange = ClientSize.Width;
horizontalScrollBar.LargeChange = 
largeChange;
}
if (verticalVisible)