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? 7 1714
Never mind. Got that part.
Now, how do I set descending order for list box?
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
"Amanda" wrote:
Never mind. Got that part.
Now, how do I set descending order for list box?
Michael Nemtsev wrote:
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.
>
--
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
"Amanda" wrote:
Never mind. Got that part.
Now, how do I set descending order for list box?
Hello Amanda,
How do u fill up the ListBox? With DataSet/DataTable?
AMichael Nemtsev wrote:
A>
>There are 2 cases 1) Use Array.Sort + Array.Reverse 2) Override ListBox.Sort in custom class inherited from ListBox
AWe 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
"Amanda" wrote:
>>Never mind. Got that part.
Now, how do I set descending order for list box?
---
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 Nemtsev wrote:
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.
>
AMichael Nemtsev wrote:
A>
There are 2 cases
1) Use Array.Sort + Array.Reverse
2) Override ListBox.Sort in custom class inherited from ListBox
AWe 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
"Amanda" wrote:
Never mind. Got that part.
Now, how do I set descending order for list box?
---
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
Hello Amanda,
There is no other way for desc sort except I described -data sort or override
Sort of ListBox control
AMichael Nemtsev wrote:
A>
>Hello Amanda,
How do u fill up the ListBox? With DataSet/DataTable?
AData is placed at design time in combo box. At runt ime, move back
Aand forth (as long as at leats one entry is left in combo box) to the
Alist box but the data must be in descending order in list box at all
Atime.
A>
AI set sort property to true in design time for both combo and list
Abox which by default, it seems is ascending order.
A>
>AMichael Nemtsev wrote: A>
>>>There are 2 cases 1) Use Array.Sort + Array.Reverse 2) Override ListBox.Sort in custom class inherited from ListBox
AWe 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 "Amanda" wrote:
Never mind. Got that part. > Now, how do I set descending order for list box? >
--- 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
---
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 Nemtsev wrote:
Hello Amanda,
There is no other way for desc sort except I described -data sort or override
Sort of ListBox control
Thanks.
>
AMichael Nemtsev wrote:
A>
Hello Amanda,
How do u fill up the ListBox? With DataSet/DataTable?
AData is placed at design time in combo box. At runt ime, move back
Aand forth (as long as at leats one entry is left in combo box) to the
Alist box but the data must be in descending order in list box at all
Atime.
A>
AI set sort property to true in design time for both combo and list
Abox which by default, it seems is ascending order.
A>
AMichael Nemtsev wrote:
A> There are 2 cases 1) Use Array.Sort + Array.Reverse 2) Override ListBox.Sort in custom class inherited from ListBox
AWe 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 "Amanda" wrote:
Never mind. Got that part.
Now, how do I set descending order for list box?
---
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
---
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vilem Sova |
last post by:
I want to use a user-defined object in the 'Add' method to add items to a
combo box. The help documentation says that if you use an object in the add
method then the object's 'ToString' method is...
|
by: ScottBH |
last post by:
Discovered a fun one that I thought I should share, and hopefully catch
Microsoft's attention to update some documentation.
I'm a bit new to VB.NET, and was struggling with getting a combo box to...
|
by: VB User |
last post by:
I would like the text property of combo box to read the first item of the
list on form load. I have a set of four items in the collection.
How do I do it?
Thanks
|
by: Steph |
last post by:
Hello,
First, i'm french.... so my english isn't very good.
I use the propertygrid control to edit an object that I have created (class)
which represents a record of table in a database.Some...
|
by: jerry.ranch |
last post by:
I've been using row source with the QBE for my list and combo
boxes..when would I use control source?
jerry
|
by: simonsmith987 |
last post by:
I am displaying a list of properties on my GUI. All the properties
have combo boxes that shouldn't be allowed to be edited. At the minute
this works fine for bool values, see the code below for...
|
by: mirandacascade |
last post by:
Using Access 2003.
For this application when one enters data and clicks a command button,
code gets run that does the following:
For 5 different combo box controls:
- create a querydef
-...
|
by: Looch |
last post by:
Hi All,
Aside from code logic (if then, bool variables), is there a way to set
a combo box click method to only execute when the index (text) is
actually changed by a mouse click? I've changed...
|
by: Just_a_fan |
last post by:
In VB6, I could easily take the value from a combo box and make a
command with it, this: baudrate = cboBaud(listindex).
With the new dotted stuff in VB9, I can't seem to do that. Here's an...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |