473,732 Members | 2,205 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

3rd party dual listbox control

Hi all,

After unsuccessfully trying to make my own dual listbox control out of
arraylists, I decided to look for a 3rd party control. I've looked for over
a week now and can't find anything but ASP.Net stuff when I need a Windows
Form control. I've seen dual listbox populators in countless Windows
applications, and have seen them run very fast, so I figured this would be
extremely popular.

Here's how it should work:
1. Data from an arraylist of objects is passed to the control.
2. The control populates a listbox on the right with this data (displaying
what column I want - say "StateNames " being displayed and "StateID" and
"StateAbbre v" and "Population " or any number of extra information from the
object that can be tracked with it).
3. The user makes 1 or more selections (multi-selection is optional, but
would be nice) and clicks on an "Add" or "<" button to send the selection(s)
to the left hand listbox.
The user may also "Remove" selections from the left hand listbox.
4. The items in the lefthand listbox are available as an arraylist for
further processing.

Sound simple?
It should be, but there are no examples anywhere of this being done with
arraylists, I've "googled", "webcrawled ", etc for the last 10 days with no
luck (I have code doing this with datatables, yes, but I need it to be done
with arraylists - which has proved elusive).

Any ideas of where to start looking?

TIA
Dave
Nov 21 '05 #1
7 4531
This image should clarify.

www.miraclecat.com/listbox2listbox.gif

MCDave
Nov 21 '05 #2
What is so difficult in writing this control?

insert one lisbox
insert the buttons
insert other listbox

fill the first listbox

create an empty arraylist

when the user clicks the move here button
get the item using the listbox.selecte dindex
remove from the collection, and the listbox.items
add it to the other collection and to the other listbox

I am missing something?

Alejandro Lapeyre
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en el
mensaje news:Oa******** ********@TK2MSF TNGP12.phx.gbl. ..
This image should clarify.

www.miraclecat.com/listbox2listbox.gif

MCDave

Nov 21 '05 #3
The first listbox cannot be updated directly as it is bound by the
arraylist.
So I remove an item from the arraylist that is tied to the first listbox,
but because the listbox is bound, I can't simply remove an item directly
from the listbox (if I try to remove anything directly from the listbox, I
get an error that basically says it is already bound - catch 22).

In other words:
say the bound listbox is called "lstRegionNames " and it is bound to the
arraylist "alRegionNa mes"
Private alRegionNames As New ArrayList
Private alSelectedRegio nNames As New ArrayList

Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()

End Sub
Private Sub loadDBRegionNam es()

alRegionNames = SalesRegionsDB. GetRegionNamesA ctiveAL

'the first listbox bound to the arraylist
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = alRegionNames

' the second listbox -
lstSelectedRegi onNames.Display Member = "reg_name"
lstSelectedRegi onNames.ValueMe mber = "reg_idx"

End Sub
Private Sub Add() 'called when clicking the Add button

If lstRegionNames. SelectedIndex < 0 Then Return 'if nothing selected,
exit sub
Dim sr As New SalesRegionDD 'the object which contains "reg_idx" and
"reg_name"
sr = lstRegionNames. SelectedItem
Me.lstSelectedR egionNames.Item s.Add(sr) 'add the object to the second
listbox - this works fine

Me.alRegionName s.RemoveAt(lstR egionNames.Sele ctedIndex) 'remove that object
from the arraylist - this works fine- I verified this by looping through the
objects in "alRegionNa mes" - the object was indeed removed from the
arraylist

'an attempt at refreshing the first listbox by re-binding it to the
arraylist - this does not refresh "lstRegionNames "
Me.lstRegionNam es.DataSource = Me.alRegionName s

End Sub
I had done this with a datatable and removing an item from the datatable
removes it from the bound listbox automatically.
Doing the exact same thing with an arraylist does not work, though.

I don't know how to proceed or what else needs to be done to be able to
remove the item from "lstRegionNames "

"alejandro lapeyre" <al************ **@jotmail.com> wrote in message
news:eA******** ********@TK2MSF TNGP10.phx.gbl. ..
What is so difficult in writing this control?

insert one lisbox
insert the buttons
insert other listbox

fill the first listbox

create an empty arraylist

when the user clicks the move here button
get the item using the listbox.selecte dindex
remove from the collection, and the listbox.items
add it to the other collection and to the other listbox

I am missing something?

Alejandro Lapeyre
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en el
mensaje news:Oa******** ********@TK2MSF TNGP12.phx.gbl. ..
This image should clarify.

www.miraclecat.com/listbox2listbox.gif

MCDave


Nov 21 '05 #4
When I say a bound listbox cannot be updated, I mean that I get the
following error:

"An unhandled exception of type 'System.Argumen tException' occurred in
system.windows. forms.dll
Additional information: Cannot modify the Items collection when the
DataSource property is set."

It appears there is a bug that prevents updating of a listbox from an
arraylist (when the arraylist is bound to the listbox).
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
The first listbox cannot be updated directly as it is bound by the
arraylist.
So I remove an item from the arraylist that is tied to the first listbox,
but because the listbox is bound, I can't simply remove an item directly
from the listbox (if I try to remove anything directly from the listbox, I
get an error that basically says it is already bound - catch 22).

In other words:
say the bound listbox is called "lstRegionNames " and it is bound to the
arraylist "alRegionNa mes"
Private alRegionNames As New ArrayList
Private alSelectedRegio nNames As New ArrayList

Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()

End Sub
Private Sub loadDBRegionNam es()

alRegionNames = SalesRegionsDB. GetRegionNamesA ctiveAL

'the first listbox bound to the arraylist
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = alRegionNames

' the second listbox -
lstSelectedRegi onNames.Display Member = "reg_name"
lstSelectedRegi onNames.ValueMe mber = "reg_idx"

End Sub
Private Sub Add() 'called when clicking the Add button

If lstRegionNames. SelectedIndex < 0 Then Return 'if nothing selected,
exit sub
Dim sr As New SalesRegionDD 'the object which contains "reg_idx" and
"reg_name"
sr = lstRegionNames. SelectedItem
Me.lstSelectedR egionNames.Item s.Add(sr) 'add the object to the second
listbox - this works fine

Me.alRegionName s.RemoveAt(lstR egionNames.Sele ctedIndex) 'remove that object from the arraylist - this works fine- I verified this by looping through the objects in "alRegionNa mes" - the object was indeed removed from the
arraylist

'an attempt at refreshing the first listbox by re-binding it to the
arraylist - this does not refresh "lstRegionNames "
Me.lstRegionNam es.DataSource = Me.alRegionName s

End Sub
I had done this with a datatable and removing an item from the datatable
removes it from the bound listbox automatically.
Doing the exact same thing with an arraylist does not work, though.

I don't know how to proceed or what else needs to be done to be able to
remove the item from "lstRegionNames "

"alejandro lapeyre" <al************ **@jotmail.com> wrote in message
news:eA******** ********@TK2MSF TNGP10.phx.gbl. ..
What is so difficult in writing this control?

insert one lisbox
insert the buttons
insert other listbox

fill the first listbox

create an empty arraylist

when the user clicks the move here button
get the item using the listbox.selecte dindex
remove from the collection, and the listbox.items
add it to the other collection and to the other listbox

I am missing something?

Alejandro Lapeyre
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en el
mensaje news:Oa******** ********@TK2MSF TNGP12.phx.gbl. ..
This image should clarify.

www.miraclecat.com/listbox2listbox.gif

MCDave



Nov 21 '05 #5
Do not attach it to the DataSource property.

Simply fill the ListBox with the ArrayList contents.

Alejandro Lapeyre

"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en el
mensaje news:%2******** **********@TK2M SFTNGP11.phx.gb l...
When I say a bound listbox cannot be updated, I mean that I get the
following error:

"An unhandled exception of type 'System.Argumen tException' occurred in
system.windows. forms.dll
Additional information: Cannot modify the Items collection when the
DataSource property is set."

It appears there is a bug that prevents updating of a listbox from an
arraylist (when the arraylist is bound to the listbox).
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> wrote in message
news:%2******** **********@TK2M SFTNGP12.phx.gb l...
The first listbox cannot be updated directly as it is bound by the
arraylist.
So I remove an item from the arraylist that is tied to the first listbox,
but because the listbox is bound, I can't simply remove an item directly
from the listbox (if I try to remove anything directly from the listbox,
I
get an error that basically says it is already bound - catch 22).

In other words:
say the bound listbox is called "lstRegionNames " and it is bound to the
arraylist "alRegionNa mes"
Private alRegionNames As New ArrayList
Private alSelectedRegio nNames As New ArrayList

Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()

End Sub
Private Sub loadDBRegionNam es()

alRegionNames = SalesRegionsDB. GetRegionNamesA ctiveAL

'the first listbox bound to the arraylist
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = alRegionNames

' the second listbox -
lstSelectedRegi onNames.Display Member = "reg_name"
lstSelectedRegi onNames.ValueMe mber = "reg_idx"

End Sub
Private Sub Add() 'called when clicking the Add button

If lstRegionNames. SelectedIndex < 0 Then Return 'if nothing selected,
exit sub
Dim sr As New SalesRegionDD 'the object which contains "reg_idx" and
"reg_name"
sr = lstRegionNames. SelectedItem
Me.lstSelectedR egionNames.Item s.Add(sr) 'add the object to the second
listbox - this works fine

Me.alRegionName s.RemoveAt(lstR egionNames.Sele ctedIndex) 'remove that

object
from the arraylist - this works fine- I verified this by looping through

the
objects in "alRegionNa mes" - the object was indeed removed from the
arraylist

'an attempt at refreshing the first listbox by re-binding it to the
arraylist - this does not refresh "lstRegionNames "
Me.lstRegionNam es.DataSource = Me.alRegionName s

End Sub
I had done this with a datatable and removing an item from the datatable
removes it from the bound listbox automatically.
Doing the exact same thing with an arraylist does not work, though.

I don't know how to proceed or what else needs to be done to be able to
remove the item from "lstRegionNames "

"alejandro lapeyre" <al************ **@jotmail.com> wrote in message
news:eA******** ********@TK2MSF TNGP10.phx.gbl. ..
> What is so difficult in writing this control?
>
> insert one lisbox
> insert the buttons
> insert other listbox
>
> fill the first listbox
>
> create an empty arraylist
>
> when the user clicks the move here button
> get the item using the listbox.selecte dindex
> remove from the collection, and the listbox.items
> add it to the other collection and to the other listbox
>
> I am missing something?
>
> Alejandro Lapeyre
> "MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en
> el
> mensaje news:Oa******** ********@TK2MSF TNGP12.phx.gbl. ..
> > This image should clarify.
> >
> > www.miraclecat.com/listbox2listbox.gif
> >
> > MCDave
> >
> >
>
>



Nov 21 '05 #6
I did figure out a workaround that basically sets the datasource to the
clone of the original list as in the following:

Private alRegionNames As New ArrayList
Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()

End Sub

Private Sub loadDBRegionNam es()
alRegionNames = SalesRegionsDB. GetRegionNamesA ctiveAL

'the right hand box
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = alRegionNames

End Sub

'sub called by add button click event
Private Sub Add()

Dim sindex As Integer = Me.lstRegionNam es.SelectedInde x
If sindex < 0 Then Return

Dim sr As New SalesRegionDD
sr = Me.lstRegionNam es.SelectedItem

Dim itemcount As Integer = Me.lstRegionNam es.Items.Count

Me.lstSelectedR egionNames.Item s.Add(sr) 'this is another listbox
that is not bound

Me.lstRegionNam es.SelectedInde x = -1
Me.alRegionName s.RemoveAt(sind ex)

' I put this test in to see if there is only 1 item left in the
source listbox, if so,
' set the datasource to nothing or else there will be a very
noticeable delay for the ' last item to pass over to the left box
If itemcount = 1 Then
Me.lstRegionNam es.DataSource = Nothing
Else
Me.lstRegionNam es.DisplayMembe r = "reg_name"
Me.lstRegionNam es.ValueMember = "reg_idx"
Me.lstRegionNam es.DataSource = Me.alRegionName s.Clone
' if you use the clone, then you don't have to set the datasource to
nothing first

End If
End Sub
However, my solution is not very elegant (and probably slow) and the ListBox
bugs will probably be remedied in DotNet 2.0.

I'll probably just do your solution and keep track of both the listbox and
the arraylist contents without a DataSource, adding and removing items via
comparison as you suggest.

"alejandro lapeyre" <al************ **@jotmail.com> wrote in message
news:eu******** ********@TK2MSF TNGP14.phx.gbl. ..
Do not attach it to the DataSource property.

Simply fill the ListBox with the ArrayList contents.

Alejandro Lapeyre

"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en el
mensaje news:%2******** **********@TK2M SFTNGP11.phx.gb l...
When I say a bound listbox cannot be updated, I mean that I get the
following error:

"An unhandled exception of type 'System.Argumen tException' occurred in
system.windows. forms.dll
Additional information: Cannot modify the Items collection when the
DataSource property is set."

It appears there is a bug that prevents updating of a listbox from an
arraylist (when the arraylist is bound to the listbox).
"MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> wrote in message news:%2******** **********@TK2M SFTNGP12.phx.gb l...
The first listbox cannot be updated directly as it is bound by the
arraylist.
So I remove an item from the arraylist that is tied to the first listbox, but because the listbox is bound, I can't simply remove an item directly from the listbox (if I try to remove anything directly from the listbox, I
get an error that basically says it is already bound - catch 22).

In other words:
say the bound listbox is called "lstRegionNames " and it is bound to the
arraylist "alRegionNa mes"
Private alRegionNames As New ArrayList
Private alSelectedRegio nNames As New ArrayList

Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()

End Sub
Private Sub loadDBRegionNam es()

alRegionNames = SalesRegionsDB. GetRegionNamesA ctiveAL

'the first listbox bound to the arraylist
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = alRegionNames

' the second listbox -
lstSelectedRegi onNames.Display Member = "reg_name"
lstSelectedRegi onNames.ValueMe mber = "reg_idx"

End Sub
Private Sub Add() 'called when clicking the Add button

If lstRegionNames. SelectedIndex < 0 Then Return 'if nothing selected, exit sub
Dim sr As New SalesRegionDD 'the object which contains "reg_idx" and
"reg_name"
sr = lstRegionNames. SelectedItem
Me.lstSelectedR egionNames.Item s.Add(sr) 'add the object to the second
listbox - this works fine

Me.alRegionName s.RemoveAt(lstR egionNames.Sele ctedIndex) 'remove that

object
from the arraylist - this works fine- I verified this by looping through
the
objects in "alRegionNa mes" - the object was indeed removed from the
arraylist

'an attempt at refreshing the first listbox by re-binding it to the
arraylist - this does not refresh "lstRegionNames "
Me.lstRegionNam es.DataSource = Me.alRegionName s

End Sub
I had done this with a datatable and removing an item from the

datatable removes it from the bound listbox automatically.
Doing the exact same thing with an arraylist does not work, though.

I don't know how to proceed or what else needs to be done to be able to
remove the item from "lstRegionNames "

"alejandro lapeyre" <al************ **@jotmail.com> wrote in message
news:eA******** ********@TK2MSF TNGP10.phx.gbl. ..
> What is so difficult in writing this control?
>
> insert one lisbox
> insert the buttons
> insert other listbox
>
> fill the first listbox
>
> create an empty arraylist
>
> when the user clicks the move here button
> get the item using the listbox.selecte dindex
> remove from the collection, and the listbox.items
> add it to the other collection and to the other listbox
>
> I am missing something?
>
> Alejandro Lapeyre
> "MCDave" <daven(delete_t his)@miraclecat DELETETHISTOO.c om> escribió en
> el
> mensaje news:Oa******** ********@TK2MSF TNGP12.phx.gbl. ..
> > This image should clarify.
> >
> > www.miraclecat.com/listbox2listbox.gif
> >
> > MCDave
> >
> >
>
>



Nov 21 '05 #7
I wrote some working code for what I needed - no 3rd party control
necessary.
For everyone's scrutiny:
Basically, there are 2 listboxes bound with arraylists, both needed to be
populated from the DB showing the regions that currently belong to the
salesrep on the left side and regions that do not belong to the salesrep on
the right side (wasn't thinking clearly earlier - damn, it's hard to
concentrate while on pain medication!).

///
Private alRegionNames As New ArrayList 'left hand listbox
Private alSelectedRegio nNames As New ArrayList

Private Sub form4_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
loadDBRegionNam es()
End Sub

Private Sub loadDBRegionNam es()
alRegionNames = SalesRegionsDB. GetAvailRegName sForSA(1) 'gets all
regions that are not already assigned to a salesman
Me.SetRightList boxDataSource(a lRegionNames)

alSelectedRegio nNames = SalesRegionsDB. GetRegionNamesF orSA(1) 'gets
currently assigned regions
Me.SetLeftListb oxDataSource(al SelectedRegionN ames)
End Sub

Private Sub SetLeftListboxD ataSource(ByRef dsL As ArrayList)
lstSelectedRegi onNames.Display Member = "reg_name"
lstSelectedRegi onNames.ValueMe mber = "reg_idx"
lstSelectedRegi onNames.DataSou rce = dsL
End Sub

Private Sub SetRightListbox DataSource(ByRe f dsR As ArrayList)
lstRegionNames. DisplayMember = "reg_name"
lstRegionNames. ValueMember = "reg_idx"
lstRegionNames. DataSource = dsR
End Sub

Private Sub Add()
Dim sindex As Integer = Me.lstRegionNam es.SelectedInde x
If sindex < 0 Then Return

Dim sr As New SalesRegionDD
sr = Me.lstRegionNam es.SelectedItem

Dim itemcount As Integer = Me.lstRegionNam es.Items.Count

Me.alSelectedRe gionNames.Add(s r)
Me.alRegionName s.RemoveAt(sind ex)

Me.SetLeftListb oxDataSource(Me .alSelectedRegi onNames.Clone)
'I put this test in to see if there is only 1 item left in the
listbox, if so,
' it sets the datasource to nothing (or else there will be a very
noticeable delay for the last item to pass over to the other box)
If itemcount = 1 Then
Me.lstRegionNam es.DataSource = Nothing
Else
Me.SetRightList boxDataSource(M e.alRegionNames .Clone) 'if you
use the clone, then you don't have to set the datasource to nothing first -
go figure!
End If

End Sub

Private Sub AddAll()
Me.alSelectedRe gionNames.AddRa nge(Me.alRegion Names)
Me.alRegionName s.Clear()
Me.lstRegionNam es.DataSource = Nothing
Me.SetLeftListb oxDataSource(Me .alSelectedRegi onNames.Clone)
End Sub

Private Sub RemoveAll()
Me.alRegionName s.AddRange(Me.a lSelectedRegion Names)
Me.alSelectedRe gionNames.Clear ()
Me.lstSelectedR egionNames.Data Source = Nothing
Me.SetRightList boxDataSource(M e.alRegionNames .Clone)
End Sub

Private Sub Remove()
Dim sindex As Integer = Me.lstSelectedR egionNames.Sele ctedIndex
If sindex < 0 Then Return

Dim sr As New SalesRegionDD
sr = Me.lstSelectedR egionNames.Sele ctedItem

Dim itemcount As Integer = Me.lstSelectedR egionNames.Item s.Count
Me.alRegionName s.Add(sr)
Me.alSelectedRe gionNames.Remov eAt(sindex)

If Me.lstSelectedR egionNames.Item s.Count > 0 Then
Me.lstSelectedR egionNames.Sele ctedIndex = 0
End If

Me.SetRightList boxDataSource(M e.alRegionNames .Clone)

If itemcount = 1 Then
Me.lstSelectedR egionNames.Data Source = Nothing
Else
Me.SetLeftListb oxDataSource(Me .alSelectedRegi onNames.Clone)
End If
End Sub

Private Sub btnAdd_Click(By Val sender As System.Object, ByVal e As
System.EventArg s) Handles btnAdd.Click
Me.Add()
End Sub

Private Sub btnRemove_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnRemove.Click
Me.Remove()
End Sub

Private Sub btnAddAll_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnAddAll.Click
AddAll()
End Sub

Private Sub btnRemoveAll_Cl ick(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles btnRemoveAll.Cl ick
RemoveAll()
End Sub
\\\

Many thanks to all who helped in this endeavor,

MCDave
Nov 21 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3424
by: Luca | last post by:
Hello, I'm using a windows form in which there is a standard ListBox control. I want to add/remove objects from the ArrayList associated to the ListBox, and I want the ListBox immediately shows graphically the change: e.g. if I remove an element from the ArrayList object, then that element should not be no more displayed in the list box. Actually i'm using this code below:
2
23360
by: John R. | last post by:
I want to have a listbox that shows a checkbox and a textbox. I created a user control that has a checkbox and a textbox in it and have been trying to add it to a listbox but I can't get it to show up for each item I add to the listbox. foreach (Column column in columns) { ColumnsListBox.Items.Add(column.Name); ColumnsListBox.Controls.Add(new ColumnListControl(true, column.Name,
8
2883
by: Oddball | last post by:
Ok - I have a ListBox control and I'm ready to write my own DrawItem event handler. What I want to draw as the item is another control. I have created a user control that I would like to list in this listbox but I can't for the life of me figure out how to draw the control inside ListBox... I get as far as: private void lbImageList_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e)
6
2876
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset a denormalized mirror of the database, but I'm not having much luck getting the selection logic down (I haven't found a 'hook' where I can access the listbox object as an object to set the listitem's selected property before it gets rendered).. ...
4
2458
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item, what do I need to do in order to return the "option value" of the control? Moe !--- returned value of the control
18
2021
by: Dave Sauny | last post by:
Ok, its a friday, I'm at work and I cant get this to work: I have 3 listboxes on one tab control page. when i select an item in listbox1 i want whatever is selected on the other 2 listboxes unselected. when listbox2 is selected, 1 and 3 should have no items selected and the same with listbox 3. Sounds simple... should be simple! I have tried listbox.clearselected(), listbox.selectedindex=-1 and beating it with a large stick. But so...
3
2425
by: Hugh O | last post by:
Hi, There is a ROW property on the Web Listbox control within VB.Net. The description states it is "The number of visible rows to display". I have tried setting this property in many different ways. It does not appear to do much of anything. I was trying to use it to control the actual size in rows of the list box on the Web page. But the size of the Web listbox seems to be fixed and controlled by the size of the control set in the...
8
6384
by: nirdeshonline | last post by:
Hi, I have added a simple listbox in windows form under c# 2.0. It contains a collection of approx 10 strings as list items. Now when i resize the form whole listbox flickers. Please tell me any feasible solution, i need to use a checked listbox which also has same flickering problem on resize. Thanks & Regards
2
2863
by: Chip Pearson | last post by:
I'm sure that there is a simple answer but I can't find it. I need a third-part ActiveX control on a form in VB.NET 2005. I can't find anything on the built-in Forms Toolbox to add a new control nor can I find anything in commandbar Customize dialog to add a new control to a form. In the project's reference list, I have added a reference to that control's file, and it shows up in the Object Browser. I just can't figure out how to add...
0
8946
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9307
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8186
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6735
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.