VC++ calls this a spin control, I think VB calls it an updown? Anyway
it is the control with two arrows on the right for entering numeric
values.
I have another text control that uses the spin control contents to form
a file name, i.e.
spin #1 is page # and spin #2 is total number of pages, and the text
control spells it out as
page_01_of_02
I have the code to update the text controls within the handler for the
spin controls, but it is always one behind.
I.e. here is the routine which displays the composite text string,
control name is "outputname".
Private Sub RefreshName()
OutputName.Text = "p" + PageUpDown.Text + "_of_" +
NPagesUpDown.Text
OutputName.Update()
End Sub
And all the updown control handler does is to call this.
Private Sub PageUpDown_ValueChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles PageUpDown.ValueChanged
RefreshName()
End Sub
but the result is always one off, for example if they start out as
PageUpDown.Text = 1 and NPagesUpDown = 2, I call refreshname(), I get
p1_of_2
when I click up on PageUpDown, PageUpDown.Text now = 2 but the output
is still
p1_of_2
if I then click down on PageUpDown, PageUpDown.Text now = 1 but the
output is now
p2_of_2
What am I doing wrong?