I tried to fixed and figure out to move bottom and top for swap. it won't move.
private void topbutton_Click(object sender, EventArgs e)
{
int moveSpace = postProcesslistBox.SelectedIndex;
int ItemIndexOfItemToMove = postProcesslistBox.SelectedIndex;
if (this.postProcesslistBox.SelectedIndex != 0)
{
for (int i = ItemIndexOfItemToMove; i != 0; i--)
{
Swap(i, i - 1);
this.postProcesslistBox.SelectedIndex = i-1;
}
}
}
private void Swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
}
thanks