Datagridview - check if the last column is fully displayed

I was wondering if there was a way to determine if the last column is fully displayed.

I know there is a Displayed property on a column, but that property is true if the column is either partially or fully displayed. I only want it if the column is fully displayed.


This will do it:

Function IsFullyVisible(ByVal dg As DataGridView, ByVal columnindex As Integer) As Boolean  

    Return dg.GetColumnDisplayRectangle(columnindex, False).Width = dg.GetColumnDisplayRectangle(columnindex, True).Width

End Function

Call it by IsFullyVisible(DataGridView1, DataGridView1.ColumnCount - 1) to get if the last column is fully visible.

Need Your Help

Qt4 Widget: implementing a wait function without blocking the widget

c++ user-interface qt4 widget wait

I'm writing a simple game in C++ using the (awesome) Qt4 libraries. For a while now, I'm having trouble with the following:

Android - Dynamic textViews - setMargins not applying?

android android-layout relativelayout android-textview

I'm trying to make a dynamic grid layout, it being API 10+ is the part that's been making it slow going. I tried to make it wrap automatically.. but in the end found it easier just to try to force it

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.