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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to select a symbol in palette

Thread ID:

Created:

Updated:

Platform:

Replies:

117470 Oct 26,2014 08:34 PM UTC Oct 29,2014 03:03 PM UTC WinForms 3
loading
Tags: Diagram
Julian Alvarez
Asked On October 26, 2014 08:34 PM UTC

Hello,

i want to select or highlight a symbol in palette.
My goal is to help user to find a symbol from a text in a textbox and after it clicks a button.
This project is in VB Net.

Thank you.

Julian Alvarez 

Ashok Kumar V [Syncfusion]
Replied On October 27, 2014 07:03 AM UTC

Hi Julian,

Thanks for your interest in Syncfusion product.

We have created a simple sample which achieves your requirement of selecting/highlighting the Node in the palette. We suggest you to use paletteGroupView’s “SelectedNode” function to achieve your requirement. Please refer the below code snippet and sample for your reference.

Here is the code snippet:

[VB]

     If paletteGroupView1.Palette IsNot Nothing Then

        For Each nd As Node In paletteGroupView1.Palette.Nodes

            If textBox1.Text = nd.Name Then

                'To Highlight the selectedNode

                paletteGroupView1.SelectNode(nd)

            End If

        Next nd

    End If

Please let us know if any concern.

Regards,

Ashok Kumar. 


Attachment: VB_131252_a96d7793.zip

Julian Alvarez
Replied On October 27, 2014 11:51 AM UTC

Thank you for your answer, but i have again a little problem. 
I used a palettegroupbar with scrolling bars because  it contains a lot of items, so when i look for an item not visible the palettegroup doesn't scroll down until the desired item.

Best regards

Julian Alvarez
 

Ashok Kumar V [Syncfusion]
Replied On October 29, 2014 03:03 PM UTC

Hi Julian,

Thanks for your update.

Please note that diagram’s “PaletteGroupView” also contains scroll bar, when more items are added to the GroupView. We suggest you to use paletteGroupView’s “BringItemIntoView” function to achieve your requirement. Please refer the below code snippet for your reference.

Here is the Code:

[VB]

If paletteGroupView1.Palette IsNot Nothing Then

        Dim incr = 0

        For Each nd As Node In paletteGroupView1.Palette.Nodes

            If textBox1.Text = nd.Name Then

                'To select the Node/Highlight

                paletteGroupView1.SelectNode(nd)

                'To Bring Item into the View

                paletteGroupView1.BringItemIntoView(incr)

            End If

            incr += 1

        Next nd

    End If

Please try the below attached sample and let us know if any concern.

Regards,

Ashok Kumar.


Attachment: VB_117470_2b177bfa.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.

Warning Icon 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.Close Icon

;