We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Example VB code for EditControl throws an error

Thread ID:

Created:

Updated:

Platform:

Replies:

117067 Aug 3,2014 07:27 PM Aug 4,2014 09:42 AM Windows Forms 1
loading
Tags: EditControl
Phillip A. Lewis
Asked On August 3, 2014 07:27 PM

The following VB code is copied from the EditControl online documentation regarding implementation of columnlines for windows forms:

' Enable Column Guides.

Me.editControl1.ShowColumnGuides = True

 

' Specify the color and the location of the Column Guides.

Dim columnGuideItem() As ColumnGuideItem = NewColumnGuideItem(2)

columnGuideItem(0) = New ColumnGuideItem(20, Color.Yellow)

columnGuideItem(1) = New ColumnGuideItem(40, Color.IndianRed)

Me.editControl1.ColumnGuideItems = columnGuideItem

 

' Font used to calculate the column location.

Me.editControl1.ColumnGuidesMeasuringFont = NewFont("Microsoft Sans Serif",12)


However, VS 2012 reports the following error:

Error 1 Value of type 'Syncfusion.Windows.Forms.Edit.Utils.ColumnGuideItem' cannot be converted to '1-dimensional array of Syncfusion.Windows.Forms.Edit.Utils.ColumnGuideItem'.


for the line
Dim columnGuideItem() As ColumnGuideItem = NewColumnGuideItem(2)

Can someone suggest a solution? Thanks.

Senthil Kumaran Rajan [Syncfusion]
Replied On August 4, 2014 09:42 AM

Hi Phillip,

 

Thank you for using Syncfusion products,

 

We request you to make use of below code snippet to achieve this requirement. We have also prepared a sample for your reference it is attached below.

 

Code Snippet [vb]:

Dim columnGuideItem As ColumnGuideItem() = New ColumnGuideItem(1) {}

 

And we have alerted our documentation team to ensure as this VB code has been corrected in our user guide.

 

Please let us know if you need further assistance,

 

Regards,

R.Senthil kumaran.


Attachment: WindowsApplication1_80c549cc.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;