all groups > dotnet compact framework > july 2005 >
You're in the

dotnet compact framework

group:

Always show vertical scrollbar in datgrid


Always show vertical scrollbar in datgrid Mikael Sorensen
7/30/2005 6:36:19 PM
dotnet compact framework:
Is there a way to always show the vertical scrollbar in a cf 1.0 datgrid?

With the full framework I use a custom control with something like:

Private Sub ShowScrollBars(ByVal sender As Object, ByVal e As
System.EventArgs)
'If the vertical scroll bar is not visible, set its size and display
it
With MyBase.VertScrollBar
If .Visible = False Then
.Location = New Point(ClientRectangle.Width - .Width -
BorderWidth, BorderWidth)
.Size = New Size(.Width, ClientRectangle.Height -
(BorderWidth * 2))
.Enabled = False
.Show()
End If
End With
End Sub

However MyBase.VertScrollBar is not supported by the compact framework.
How do I achieve what I want using the cf?

Alternatively - how do I - at runtime - detect if the scroolbar is shown, so
that I can resize the coloumns in the datagrid?

Regards,
Mikael

Re: Always show vertical scrollbar in datgrid Sergey Bogdanov
7/30/2005 9:39:28 PM
See this:
http://blog.opennetcf.org/sbogdanov/PermaLink.aspx?guid=b03e36e9-8b33-4a84-9c30-a43a826c1c0f


--
Sergey Bogdanov [.NET CF MVP, MCSD]
http://www.sergeybogdanov.com


[quoted text, click to view]
Re: Always show vertical scrollbar in datgrid Mikael Sorensen
7/30/2005 10:09:00 PM
Thanks Sergey.

Works perfectly.

Best regards,
Mikael Sorensen

[quoted text, click to view]

AddThis Social Bookmark Button