.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to set one palette on a paletteset on top through code?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
yaqiz
606 Views, 1 Reply

How to set one palette on a paletteset on top through code?

Hi All,

 

I have a paletteset which contains multiple palettes. How can I set one of the palette on top through code?

 

It is something like set current tab in tab control

 

Any hints?

 

Thanks

 

Regards,

Yaqi

1 REPLY 1
Message 2 of 2
norman.yuan
in reply to: yaqiz

Palette contained in a PaletteSet is indexed by its order being added into the paletteSet. If you know the index of the pallete, you can call PaletteSet.Activate(index) to activate the palette, or you can loop the PaletteSet with palette name (Palette has a name when being added into PaletteSet):

 

For i As Integer=0 To myPaletteSet.Count-1

    Dim p As Palette=myPaletteSet(i)

    If  p.Name.ToUpper()="SOMENAME" THEN

        myPalleteSet.Activate(i)

        Exit For

    End If

Next

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost