what property or method should I use in combo box to

  • Thread starter Thread starter Amanda
  • Start date Start date
A

Amanda

User is going to be transferring items out of combobox to listbox and
vice versa keeping ascending and desending order respectively at all
time.

If user selects the last item in combobox, the program is supposed to
display a message box stating that there is no more item in the
combobox with OK button to be clicked as the only option and upon
clicking OK, the program should terminate, i.e the program should check
to ensure that the ComboBox contains at least one item.

What property or method should I use to check that the user has
selected the last item left in combo box? Or should I just keep track
of the count of items and when the last one is selected, display the
message and terminate the program?
 
There are 2 cases
1) Use Array.Sort + Array.Reverse
2) Override ListBox.Sort in custom class inherited from ListBox

--
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael said:
There are 2 cases
1) Use Array.Sort + Array.Reverse
2) Override ListBox.Sort in custom class inherited from ListBox

We can't use array in this assignment yet. No inheritance either.
 
Hello Amanda,

How do u fill up the ListBox? With DataSet/DataTable?

A> Michael Nemtsev wrote:
A>A> We can't use array in this assignment yet. No inheritance either.
A>---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael said:
Hello Amanda,

How do u fill up the ListBox? With DataSet/DataTable?

Data is placed at design time in combo box. At runt ime, move back and
forth (as long as at leats one entry is left in combo box) to the list
box but the data must be in descending order in list box at all time.

I set sort property to true in design time for both combo and list box
which by default, it seems is ascending order.
 
Hello Amanda,

There is no other way for desc sort except I described -data sort or override
Sort of ListBox control

A> Michael Nemtsev wrote:
A>A> Data is placed at design time in combo box. At runt ime, move back
A> and forth (as long as at leats one entry is left in combo box) to the
A> list box but the data must be in descending order in list box at all
A> time.
A>
A> I set sort property to true in design time for both combo and list
A> box which by default, it seems is ascending order.
A>---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Michael said:
Hello Amanda,

There is no other way for desc sort except I described -data sort or override
Sort of ListBox control
Thanks.



A> Michael Nemtsev wrote:
A>
A> Data is placed at design time in combo box. At runt ime, move back
A> and forth (as long as at leats one entry is left in combo box) to the
A> list box but the data must be in descending order in list box at all
A> time.
A>
A> I set sort property to true in design time for both combo and list
A> box which by default, it seems is ascending order.
A>
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Back
Top