Check List Box Item Non Selectable?

Apr 14, 2011

Is it possible to make one or more items in a checked list box collection non-selectable? I wnat to present the items to the user but not allow selection of them.

View 6 Replies


ADVERTISEMENT

Checkbox Only Check Single Item From List?

May 16, 2011

My form contains a combobox which contains several usernames which are bound to my database.I've added a checkbox to the form which will be used to select the default username from the list.

View 8 Replies

How To Check If A Item Is Aready In A Generic List

Oct 13, 2010

I want to check if a refdes already been added to the generic list.And if so he must not be added..How do I do this I looked every where and can not fins a solution. [code]

View 5 Replies

VS 2008 Check To See If Item Exists In A List?

Jan 6, 2010

see if an object is already in a generic List(Of T) than the way I am currently doing it? The way I do it at the moment is like so:I have a method that I call each time I want to check to see if an object exists in the list (if it already exists I do not want to add it again) and the list to check is passed in to this method along with the item that should be added to it:

[Code]...

So as you can see this function just loops through the list that was passed in and if the DisplayName property of one of the items in the list is the same as the ProgramName argument that was passed in to the method as well then it returns True to indicate that this program is already in the list.I thought about using a Predicate with the List.Find method but cant see how I would get it to work because that predicate method will not have any way of referencing the list (its a method local list, not class level)

View 5 Replies

Asp.net - Check If A Checkbox List Item Is Checked/unchecked?

May 14, 2012

I have a checkbox list which is filled with entries from my database on page load. I need to update an entry in my database when a item is checked and when an item is unchecked. Right now I am doing the following:

<asp:CheckBoxList id="check1" AutoPostBack="True" TextAlign="Right" OnSelectedIndexChanged="Check" runat="server">

</asp:CheckBoxList>

And the function:

Sub Check(ByVal sender As Object, ByVal e As EventArgs)
Dim sql As String
If check1.SelectedItem.Selected = True Then[code]....

The error is: "Object reference not set to an instance of an object." Is there a better way to check if a list item is checked or unchecked?

View 1 Replies

Possible To Make List Box Item Height For Item Depending On Amount Of Lines That Item Contains?

Jan 1, 2012

I have a list box on the form which functions as a copy/paste. When you copy something, it is automatically added to the list box as a "clipboard helper". Here is the problem,however: if the text is more than 1 line, the list box does not show all the text.It ends up looking messy.So getting back to my question, is it possible to make the list box item height for an item depending on the amount of lines that item contains?This is a one line sentence in the list box and should take up one line.This is a multi line sentence in the list box and should take up two lines for item height.

View 11 Replies

VS 2008 Feed A Multi Line Textbox Into A String Array Then Check Item By Item

Jul 25, 2010

I've been trying to feed a multi line textbox into a string array then check item by item if a string contains part of it.

[Code]...

View 2 Replies

Check Combobox Item Then Change Labels To Item Selected

Oct 31, 2009

Just started on vb.net

I have a combo box with "yes" and "no" with i select Yes i want the label2 to change the text to "yes" likewise with "no"

I've tried to code it in a logical way as possible but it just doesn't works except for the "wtf" so i think that overall my code is correct but the way i want to retrieve the selected item from combo box is wrong.

Public Class Form1
Dim aa As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As

[Code].....

View 3 Replies

Get Selected Item Index Or A Sorted & Grouped List Relative To Item Source?

Feb 12, 2011

I'm having some difficulty with a sorted & grouped listbox in WPF vb.net 3.5 that has an items source bound to an ObservableCollection.

What I want to be able to do is to retrieve a piece of data from the ObservableCollection items source depending on what item in the listbox the user has selected.I've almost got it working but because the listbox is sorted it does not match the index of the items source.

[code]...

As I previously mentioned, because the lstBox is sorted and also grouped the index's don't match up.Does anyone know how I can get the correct information I want from the List Source depending on the selected item in the list box?

View 3 Replies

Select An Item From A List Box And Click A Button And Have That Item Go Into Another Listbox With It's Price

Oct 13, 2011

How someone would select an item from a list box and click a button and have that item go into another listbox with it's price? I seem to be stuck on this part.

Here's my code:

I want to select the first option from the first listbox and I want to put it into another listbox along with the price of that item on the same line in the listbox. I can't seem to figure out how to that.

Public Class Form1
Const dcmPRICE_STRESS As Decimal = CDec(595.0)
Const dcmPRICE_TIME_MANAGMENT As Decimal = 695

[CODE]...

View 12 Replies

Add To A Combobox A List Of Item (not Every Item) In A Txt Located On A Server

Feb 13, 2011

my program downloads into a combobox every item(line) that is in a text file located on a server.
Every line in the text file ends with "a)" or with "g)".

Now I just want to make 3 radio buttons:

- one that will allow the download in the combobox only the item ending with "g)"
- one that will allow the download in the combobox only the item ending with "a)"
- one that will allow the download in the combobox of both (I already know how to do).

How can I do so?

To download the entire list in the combobox I do:

Dim List As String = client.DownloadString("http://mywebsite.com/mytextfile.txt)Dim lines As String() = List.Split(New String() {ControlChars.CrLf}, StringSplitOptions.RemoveEmptyEntries)ComboBox1.Items.Clear()
ComboBox1.Items.AddRange(lines)

View 13 Replies

Delete Item From List Box Select Next Available Item?

May 14, 2012

how whould I go about deleteing an item from a listbox and it will select the next available item.you know like the treeview control selects the next node if you delete one.

View 2 Replies

Get Type Of Derived Generic List Class From List Item Method?

Mar 23, 2011

Public Class notifierMain
Public Class Contacts
Inherits List(Of row)
Public Sub New()

[code]....

When I debug this winforms application I get curType = "notifier.notifierMain+Contacts+row" I want to the Validate function to know it is in MyContacts. How do I do this?

View 3 Replies

Drop Down List Box (stop Selecting Item From List)

Jun 18, 2009

i want to stop accepting form drop down listbox if certrain criteria is not met [code]how i can cancel the selection of drop down list?

View 3 Replies

VS 2008 Search Item A (from A List Of X Items) In List B?

May 5, 2010

i want to search item A (from a list of X items) in list B but i want to get the item not found example Search ITEM A in LIST B if not found then return a print....if found continue with ITEM B..and so on.

View 5 Replies

.net - Check/DeCheck All Items In Check-list Box?

Jul 11, 2011

A couple of questions about check list boxes:

How to check/decheck all the item in the list How do you copy or delete all checked items in the list

View 1 Replies

.net - List.Contains Based On A Property Of A List Item?

Jan 11, 2011

I have a List myList of MyObjects. Is it possible to check if myList contains a particular myObject based on a property of myObject in VB.NET? In C#, you'd something similar to this right:

myList.Exists(myObject => myObject.property1 == 3)

View 2 Replies

Comparing An Item In A List Against Other Items In The Same List In .NET?

May 30, 2011

I have a List(Of MyObj), and I want to iterate through that list and compare each element to all other elements in the same list, excluding (if possible) the same element. I have a solution that works, but it's slow and uses double For loops. It may possibly have also summoned Cthulhu from his sleep. This below is a sanitized version of what I have:

Dim MyList As New List(Of MyObj)({Obj1, Obj2, Obj3, Obj4, Obj5, Obj6})
If MyList.Count > 0 Then
For i = 0 To (MyList.Count - 1) Step 1

[code]....

View 3 Replies

How To Test 1st List Box If It Has Items More Than Other List Box But By One Item

Nov 15, 2011

I want to know how to test the 1st list box if it has items more than the other list box but by one item, here is what i have: If lstInvisibleTv. Items.Count > lstInvisiblePc.Items.Count Then it works good if the lstInvisibleTv list box is greater than the other list box by one but it also works if it is greater the other one by one or more which I do not want. I want it to work just by one.

View 3 Replies

Check List Box Style Radio Button List?

Oct 26, 2010

Is it possible to have a Radio button list, like we have a checked List box?Actually I want to load all the options from database to the list but do not want user to allow to check more than one item.

Also how to read it (say item 4 of the list) I want to store its value in the variable.

View 1 Replies

Make Drawn Items Not Selectable?

Apr 19, 2009

I have a radar which works by drawing monsters onto a paint panel, which can be made transparent so that only the drawn items are shown on screen, but when you mouse over the drawn items they are selectable so it disturbs the game, is there any way to set the drawn items so that they cannot be selected? basically ignored by the mouse cursor.

View 17 Replies

Scrollable Picture Box With Selectable Pictures

May 17, 2011

I would like to build a form that has multiple picture boxes that a user can browse through and click on each one to select multiple items. The pictures will all be pulled from a single directory. After they have selected the items, they will click a button that will change the names on all the selected pictures. I know how to change the names, but I need some assistance with the picture box and loading the file names into a list or array. Not sure what it would be called. I am not even sure really if I would use a picture box or some other form item.

View 4 Replies

User Selectable Background Image ?

Jul 25, 2011

I am building a application in VB 2010 Express, that tracks sales leads, I have everything working except 1 last item. I want the users to be able to select a different background image to match their industry. I have all the images embedded, but can't figure out how to allow the user to select.

Preference is to have a separate form for the user to cheese on launch, but I am OK with it just being a dropdown in the lower left corner of the app.

View 3 Replies

Program That Will Compare Array Of Grocery List Items Glist And Array Of Coupon Item List

May 27, 2012

I have a program that will compare an array of grocery list items glist and an array of coupon item clist.When I compare the two and if there is a match somewhere in the array I want to have a picturebox visible.When there is no match, I want the picture box not to be visible. [code] The code seems to work great until I come to the else statement.When the code finds a match it displays the picture box and the msgbox without error, but as soon as the message box is cleared, even though i've input it as an ELSE statement, the picturebox goes false again.Does anyone have any idea of how I can "hold" the picturebox to stay visible while the match between the arrays exists?

View 18 Replies

VS 2010 ControlStyle.Selectable Not Functioning Properly?

Aug 20, 2011

I have my own control which inherit System.Windows.Forms.Control The only functionality that this control requires is the capability of losing and gaining focus. I learned this requires the control style of selectable to be applied which is descriptive as exactly what I'm in need of, "If true, the control can receive focus.".

However after applying this style in my code, the control still refuses to have anything to do with gaining or losing focus. Other styles I have applied to this particular control are as fallowed
UserPaint, AllPaintingInWmPaint, and SupportsTransparentBackColor. I'm not sure but perhaps one of these other styles interferes with the one that's not working properly.

View 2 Replies

Windows Application - Checkbox Become Selectable In Datagridview?

Jul 18, 2009

i added one checkbox column in datagridview i.e datagridcheckbox column but when i run and i want to select checkbox it is not going to select how to to do checkbox become selectable in datagridview in vb.net windows application

View 1 Replies

Add Multiple Pictureboxes To A Panel And Make Them Selectable During Runtime?

Nov 12, 2010

I wonder how you can make a picturebox selectable at runtime and also change the size and location during runtime?

Well I know how i can change the location of a picture box during runtime but that is only with a picturebox that is already defined in the form before runtime.

So I write an event for that particular Picturebox.

But now i want to do the same thing with a picturebox that a user can add during runtime and then the user should be able to select and move the picturebox.

So now i can't add code to the picturebox event so I wonder how you should do this. ( Maybe with reflection?)

And what if the user added 10 picture boxes and selects a certain picturebox. How do you make it possible that the picturebox the user clicks on is selected?

Should you store each picture box location on the Panel and then when the user clicks on a certain pixel in the panel where a certain picture box is it get's selected?

View 3 Replies

VS 2008 Make Lines In An Image Selectable Or Objects?

Apr 4, 2011

I am trying to find information on code to make the lines of a jpg file that have been loaded into a VB.NET WebBrowser control into selectable objects.

I have no idea what to search for or the correct terminology.

This is very similar to using the line tool in word or excel, after you draw a line you are able to select it.

View 11 Replies

VS 2010 Make A Toolstrip Combobox Selectable But Not Editable?

Jul 18, 2010

i want the user to be able to select one from the combobox but i dont want them to be able to type in there own into the actual combobox, i tried Enabled property but then you can pick one either. And i couldn't find the IsReadOnly property on the ToolStripComboBox,

View 3 Replies

Check If An Item Is Selected?

Oct 18, 2009

Im making something like a save file dialog that saves a file based on the text of a listview1.selected item.How can i check if an item is selected? How can i get its text and subitems?

If ListView1.SelectedItems(0).Selected = True Then
End If

This Returns An Error If No Item Is Selected.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved