Hello Kevin,
You can override ProcessDialogKey to handle possible key sequence which can move the colors up and down.
Here is one example implementation:
public class MyNPaletteColorPane : NPaletteColorPane
{
protected override bool ProcessDialogKey(Keys keyData)
{
if(!Selectable)
return base.ProcessDialogKey (keyData);
int currIndex = SelectedIndex;
switch(keyData)
{
case Keys.Control | Keys.Up:
currIndex--;
if (currIndex < 0 )
{
currIndex = ColorPalette.Entries.Length - 1;
}
break;
case Keys.Control | Keys.Down:
currIndex++;
if (currIndex > ColorPalette.Entries.Length - 1)
{
currIndex = 0;
}
break;
default:
return base.ProcessDialogKey(keyData);
}
NArgbColorValue c = ColorPalette.Entries[SelectedIndex];
NArgbColorValue c1 = ColorPalette.Entries[currIndex];
ColorPalette.Entries[SelectedIndex] = c1;
ColorPalette.Entries[currIndex] = c;
PopulateColors();
SelectedIndex = currIndex;
if (ChangeStyle == ColorChangeStyle.OnMouseUp)
{
OnColorChanged(EventArgs.Empty);
}
return true;
}
}
Unfortunately, control doesn't allow a multiple selection.
Best Regards,
Nevron Support Team