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. Image for the cookie policy date
close icon

Example VB code for EditControl throws an error

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.

1 Reply

SK Senthil Kumaran Rajan Syncfusion Team August 4, 2014 01:42 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon