Multiple Selections In Text Box?

Sep 23, 2011

In a small app for demonstrating the use of Regular Expression matching in a text box, I have set it up so I can select one of the matches at a time in the text box to emphasise it. Is it possible to set up a text box so several isolated sections in the text is highlighted so all of the matches are highlighted at the same time. I'm thinking not and could use a picture box to do this but with all the hidden features in vb.net, I wanted to be sure since this would be very handy for my project and would be more useful for large amounts of text. I've read you can make multiple selections in the text box of a combo box.

View 4 Replies


ADVERTISEMENT

Replace Multiple Selections In Listbox With Textbox.text?

Oct 23, 2009

I have code that works to place two items in listbox into two textboxes when selected (multiple select extended).

Private Sub lstOutput_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstOutput.SelectedIndexChanged
Dim i As Integer = lstOutput.SelectedIndex

[code]....

I need also to be able to modify the data in the textboxes and replace the lines in the listbox. The reverse code doesn't work properly, it only replaces the first selected item. The "lstOutput.Items(i + 1)" appears not to lead to the second selected item.

Dim i As Integer = lstOutput.SelectedIndex
lstOutput.SelectedItem = lstOutput.Items(i + 1)
lstOutput.Items(i) = txtName.Text
lstOutput.Items(i + 1) = txtPhone.Text

I have scoured the web for ways to manipulate the selected index/indices, with no success.

View 8 Replies

Multiple Text Boxes And Combo Box Selections Output To Txt File?

Nov 1, 2009

I'm using Vb .net 2008

I could use some advice/examples to acheive the following:

I have 1 form, 4 text boxes, (textbox1 ,2, 3, 4)

Textbox1 and Text box 3 and single line text boxes.. Textbox2 is multiline.. (a description field which can be as long or short as the user desires..)

Textbox 4 is a large multi-line textbox that will contain the output of Textbox1,2,3.

I need to find out how to output the contents typed into Textbox1,2 and 3 into Textbox4 while maintaining formatting..

For example, contents of Textbox1 should always be the first text displayed in textbox4, immediately under that should be the contents of Textbox2, and under that, Textbox3

I want to ensure that the text is displayed in that order even if the user enters information into Textbox3 first.. and still displayed in the proper order if Textbox2 has 1 line of text or 20 lines of text.

How could I do this? How can I make the text from one box always be inserted before or After text from another specific textbox when its displayed in the destination Textbox.. (think of Textbox4 like a "preview window" of sorts.. which will later be outputted to an actual txt file.

View 1 Replies

Datagridview Multiple Selections?

Jan 7, 2010

i have a textbox1=Year and a textbox2=Month and a datagridview and as datasource access i want to know the code if i search for a year in databinding and how to look for a month of the focused year?

View 4 Replies

Multiple Listbox Selections?

Sep 18, 2011

I have 2 listboxes, listbox1 holds File names, listbox2 holds fullpath of the files(listbox2 is hidden just to keep things looking tidy).

What i want to do is (using multiselection) is select files in listbox1 and have listbox2 have the same files(indexes) selected as well.

i am rather new to this but i have tried several ways but listbox2 only selects the first selected file from listbox1.I am using vs2010 visual basic & wpf?

View 9 Replies

MySQL Database Multiple Selections

May 31, 2010

I'm using this code to select all the IDs from the mysql database:[code]The command will return all the names. How can i process each one individually ?

View 6 Replies

VS 2005 ListBox Multiple Selections?

Oct 20, 2010

Working with a couple of listboxes to display userid and emailaddress. I am writing an application for viewing SSRS reports instead of using the Report Manager. I am able to select the report and also send an email to users with a web link to SSRS report so that ReportViewer comes up for them to view, export or print the report. Currently I am only able to send to one recipient and I'd like to be able to send to multiple recipients. However I am having difficulty with the multi-select from a listbox. I have set the SelectionMethod to MultiExtended and so I can select multiple items from the listbox. Here is my code -

[Code]...

and I also add a messagebox.show to display my values, in EmailAddressTo variable, it displays "System.Data.DataRowView" so it was not able to capture the email address at all. Then if I debug further I eventually get the error msg - "The specified string is not in the form required for an e-mail address." because of the empty variable. Using SelectedValue, I was able to get at least the first email address but not the second one.

View 4 Replies

Testing On Multiple Selections Made In A Listbox?

Apr 5, 2011

I am a new student of Visual Basic. I am using Vis. Studio 2010. Is there some sample VB code that I can gain access to that shows how to test on multiple selections that were selected within a listbox using the "For each" construct? In this scenario, multiple items have been selected but not 100% of them. I need to know how to test on which ones are selected as I examine each one in the list using the "For each" construct.

View 2 Replies

Getting Multiple Selections From List Box To Display In The Results Label?

Nov 5, 2009

My name is Tim I'm having a problem getting my multiple selections from my list box to display in the results label and there is no examples in the text any how I'm thinking I need to use a loop to get it done. is this evern in the ball park?

Option Explicit On
Option Strict On
Option Infer Off
Public Class MainForm

[code].....

View 5 Replies

Preventing Duplicate Selections From Multiple Combo Boxes

Aug 6, 2009

Ive got 10 comboboxes on my form, each of them have the same items. I'm trying to get so that if I pick something from the first combo box it doesnt show up in the list for the 2nd box, etc. Also, I didnt want to just remove the item, incase the user changes their selection in a previous combobox. [code] Rest of the comboboxes have that last piece of code, with the boxes and stuff changed to the correct ones.

View 7 Replies

Preventing Duplicate Selections From Multiple Combo Boxes?

Jun 10, 2011

Ive got 10 comboboxes on my form, each of them have the same items. I'm trying to get so that if I pick something from the first combo box it doesnt show up in the list for the 2nd box, etc. Also, I didnt want to just remove the item, incase the user changes their selection in a previous combobox.Example of the code I used, as im on a different computer right now.

Code:
Dim cboList As New List(Of String)
Dim index1, index2, index3, index4, index5, index6, index7, index8, index9 As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

[code]....

Rest of the comboboxes have that last piece of code, with the boxes and stuff changed to the correct ones.Problem is that it doesnt remove the previous selections correctly.

View 2 Replies

Code View Cannot Make Text Selections

Nov 23, 2009

Due to some settings changes, my code view cannot make text selections.

View 2 Replies

Make Value Selections In Dgv?

Feb 23, 2010

i have a datatable named booking_table and i filled it with column names and values

Dim booking_table As New DataTable
booking_table.Columns.Add(
"Time", GetType(String))

[code]....

than the rowindex(0) I want it to start with "8:00" than for example the rowindex(47) should end with "19:00" extra info: every our is parted in four sections of 15 min for example 8:15, 8:30 ,8:45?i want to select the starttime by date.bind to DGV?

View 5 Replies

VS 2008 Return Multiple Table Rows To Multiple Text Boxes

Feb 27, 2011

visual basic 2008 express
access 2007 db

I am attempting to fill a form with multiple rows from an access table based off of a parameterized query. My query works fine but I don't want to return one row at a time, I want to return all rows that match my query in multiple text boxes. I know that I can use a datagrid view to accomplish this, but I would prefer the look of a textboxes on a form. I have read through many books and searched the internet forums but think I may just not know what to search for as nothing has worked yet. Can anyone point me in the right direction. So far I have tried setting the text box value to the row().item(), creating a different dataset for each row, and even setting variables for the results of the query to then be passed to the text boxes. Since none of this work, I don't really have any starting code to post. If I could just get a starting point I could work from there, so don't feel the need to code anything for me, just set me in the right direction.

View 3 Replies

Randomize Selections From Listbox?

Mar 11, 2010

im helping a school run a Spelling Bee aimed at children in year 7. And to make it fair and unbiased i need an application that can choose randomise a word from the list box then transfer the string to the text box.So basically something that can pick a random string from the listbox and show it in the textbox1.text property.

View 6 Replies

Retrieve ListBox Selections?

Aug 24, 2010

here's I've got:

Private Sub frm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sql, pname, pid, pbrand, description[code]....

This adds the description to the listbox, no problem. How do I retrieve what's selected?I've gone over many documents on the subject, I kinda got it to work, but it gives me the entire description.... I just need the last value (3) to make it work.

View 5 Replies

Dataset Doesn't Return The Selections?

Aug 17, 2010

im trying to get a selected time and my dataset doesn't return the selections what am i doing wrong in this statement

dim startindex as integer= 0
dim endindex as integer= 0
for each regel as datarow in my dataset.tables("Bookingen").rows

[Code].....

View 14 Replies

Put MultiExtended Listbox Selections To Array?

Jan 14, 2010

I have a listbox with selection mode set to multiExtended. I want to put whatever is selected into an array, but I can't seem to figure out how to do it. Here is what I have so far, but with this code the selected values go into a single variable and not into an array so only the last item selected is stored.[code]....

View 4 Replies

VS 2005 Displaying Checkbox Selections?

Mar 30, 2009

this gonna sound like a really basic problem but would some1 be able to tell how me to get a checkbox selection to be displayed as a peice of a text in a listbox or a text box.

View 13 Replies

C# - Persisting Date Selections When Visible Month Changes

Feb 21, 2011

Dim List As New List(Of DateTime)

Then in my button click event:

If InputBookinglength.SelectedValue.ToString = "2" Then
Dim paramstring As New StringBuilder
If Session("SelectedDates") IsNot Nothing Then

[Code]....

This code works fine when selecting multiple days in one month. But when you switch to display a different month, the previous months selections are lost. how to persist the selections when the visible month changes.

View 1 Replies

OnSelectedIndexChanged Not Working First Selection, But Will On Subsequent Selections?

Mar 24, 2012

I have a listbox in a datagrid that is supposed to update upon selection change, and it does, but not on first try. only after it has posted back, after the first time it is clicked will it work as intended.Here is the front end portion of the datagrid with the listbox.

<asp:TemplateColumn HeaderText="Qty">
<ItemStyle HorizontalAlign="Center" Wrap="False" CssClass="grid" />
<HeaderStyle HorizontalAlign="Center" ForeColor="Black" Font-Bold="true" CssClass="grid"

[code].....

View 1 Replies

.net - Groupbox Method Monitors Radio Button Selections?

Apr 22, 2010

I'm creating a VB.NET application that includes two radio buttons inside of a groupbox. If the first radio button is selected, a certain tab on a tab form should be enabled. If the second radio button is selected, that tab should be disabled.

Is there a groupbox method that monitors both radio buttons and fires when the selection changes? Or do I need to set up individual methods for each radio button?

View 1 Replies

Datagridview Selections Change Another Tables Binding Navigator?

Sep 12, 2010

Background: Not a developer by trade. I did however, endeavor to learn VB a few years ago and I got reasonably far but without proper motivation for the time, things were difficult to take further. Fast forward half a dozen years and while working with the sales team in my company, I noticed that they were struggling with cataloguing and tracking their calls to clients. They were all trying to use one excel spreadsheet to tabulate all the clients details and calls. Of course, this was a mess. So the idea is to build them a very simple database app that will allow multiple users to add entries to a db and we could pull reports from the data in the end to check performance and such.

Application: The application so far is a very simple access db with windows forms front end. Two tables, one holding &#65533;Client&#65533; data and the other &#65533;call&#65533; data. Idea being that we can now track multiple calls per client as opposed to just the next call as was the norm. Client and CallID are the primary keys of the table, with a clientID foreign key in tbCalls . There is one query which I tried to use to do this, which joins calls and clients so that I had everything in one table. Cool. There are four forms, basically frmCaptureClientInfo, frmSearchClients, frmScheduleCalls and frmMakeCalls. Most of these forms are working fine by just dragging the dataset fields onto the form and allowing the IDE to do the coding and then a little more code to validate that the inputs are correctothing fancy just add, delete, update is all this app does.

Issue: The last form is the killer form. Killer form, because it&#65533;s caused a huge rise in blood pressure. Anyway it sounds so simple. On the form is a datagrid that is populated with contents of above query (all client and call details), filtered by the parameter that checks if the call is complete or not. Sweet. Below I have dragged in fields from tblCalls. The &#65533;callers&#65533; need to edit three fields TimeCompleted, CallNotes and a call completed checkbox. What I need is the tblCallBindingNavigator to jump to the record that I have selected in the Datagrid view. Right now they are independent and I can&#65533;t join them. If this is at all possible?I have tried using just the query, which has the right behavior except the update command is not generated automatically. Spent Many hours researching updating queries but either was too complex for me to know it was the solution, or was for different products. If there is a way to do this then that would be awesome.I have also tried editing the CallBindingNavigator databindings settings but I am not sure what is going on there, it seems to block out the navigator controls. Here is some more info:

View 3 Replies

Disable Checkbox Selections In 2008 Winform Listview?

May 6, 2009

How do you disable additional checkbox selections/deselections without sacrificing the functionality of the ListView? I know you can call: ListView.Enabled = False, but that also disables any scrolling within it.

For example: I have a timer that starts a backup based on the Listview items that are checked. After a certain time, I don't want the end-user to be able to click on any of the checkboxes within the listview (so I have a set number of items to backup), but I do want them to be able to scroll the list while the backup is being performed. I tried this[code]...

View 3 Replies

Validating And Storing Selections From A Dataset Bound Combobox

Oct 20, 2009

I have a combobox that is bound to a dataset. The dataset has 3 columns of data. at any given time there could NOT be any data in the dataset.

When someone selects an item from the box I want to store data from 2 of the columns of the row they selected.I do the 'store' in the selectedindexchanged event.

so currently I am assigning each column/row value to a property from a datarowview i get from combobox.selecteditem.

Code:dim column1 = drv.row.item(0).tostringdim column2 = drv.row.item(1).tostring

But I am getting NullReference exceptions all over the place when there is not data.So i have to wrap it all in a try catch and assign nothing to the properties when the Null exception fires.

I want to also validate that there is a selection made. There must be a selection made if there is no data in the DS fill it.I do this in the combobox validate event.

It just seems like there is a better way to check for no data coming from the combobox.

I wish there was a way to do some sort of .count on the datarowview you get back from the combobox.selecteditem but anything i have found also gives a null ref exception if used.

Also what is used to programmaticly change the selected item?

View 5 Replies

Validating And Storing Selections From A Dataset Bound Combobox?

Mar 21, 2011

I have a combobox that is bound to a dataset.The dataset has 3 columns of data.at any given time there could NOT be any data in the dataset.When someone selects an item from the box I want to store data from 2 of the columns of the row they selected.I do the 'store' in the selectedindexchanged event.so currently I am assigning each column/row value to a property from a datarowview i get from combobox.selecteditem.

Code:dim column1 = drv.row.item(0).tostringdim column2 = drv.row.item(1).tostring

But I am getting NullReference exceptions all over the place when there is not data.So i have to wrap it all in a try catch and assign nothing to the properties when the Null exception fires.I want to also validate that there is a selection made. There must be a selection made if there is no data in the DS fill it.I do this in the combobox validate event.It just seems like there is a better way to check for no data coming from the combobox.I wish there was a way to do some sort of .count on the datarowview you get back from the combobox.selecteditem but anything i have found also gives a null ref exception if used.Also what is used to programmaticly change the selected item?.selecteditem.selectedtext.selectedindex.selectedvalue?

View 2 Replies

Forms :: Customizing Queries Based On Radio Button Selections?

Apr 30, 2009

I am a new to programming, trying to learn vb.net, so I apologize if my questions are very elementary or my terminology is incorrect. I am trying to format a query to an Oracle table based on user-selected radio buttons on a Windows form (i.e. the query will return different elements from the table based on the radio buttons selected). The query results will be placed in a listbox on the form. My thought was to make a Property containing my query like so:

[Code]...

and then I have a sub that feeds this SQL property (containing the query) into an OracleConnection.My problem is that I don't know how to customize that query depending on what radio buttons are selected by the user. Is a Property the best way to go about this, or is there some other way that may be better?

View 1 Replies

If Multiple Checkboxes Are Checked / Then Copy Checkbox Text And Label Text

Apr 28, 2012

I would like to know if there was a way to loop through all the checkboxes on a form and if the checkbox is checked then I need it to copy the text from the checkbox and the label. Thera are 23 of these labels with two checkboxes for each.I need to be able to paste this in notepad and have it formated as such

Yes 1. Are you older than 18?

No 2. Do you like dogs?

View 3 Replies

VS 2008 - Saving To Text File Using Multiple Text Boxes And Labels

May 27, 2009

how to permanently save to text files then re-open all of the information again using SFD and OFD. Now my teacher has come back at me and said that i need to be able to save the information from multiple text boxes and have the text in certain labels to also be saved into the one text file (the labels need to be done because it is a database and these labels are like the fields and the right text box needs to match the right label)

View 39 Replies

Visual Basic 2008 Tutorial - Save And Load Text From Multiple Text Boxes

Aug 16, 2011

So i watched this video here. [URL]

And i want to do this for like 40+ text boxes, how can i do it?

View 1 Replies







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