Set A Tab Index For The Controls Inside?
Oct 3, 2011
I designed a form, set a tab index for the controls inside, but when I send "tab" from some, the focus not always go to the right one.
I mean:
textbox1 - tabindex = 1
textbox2 - tabindex = 2
textbox3 - tabindex = 3
button1 - tabindex = 4
I send a tab from textbox 2 and the focus go to the button, not to the txtbox3.
View 9 Replies
ADVERTISEMENT
Nov 8, 2011
If I have the following ListView, how can I attach a SelectedIndexChanged event listener to the DropDownList so I can perform a command on the respective object? Imagine I have a list of new users and I want to add them to a usergroup by selecting the group from the DropDownList.
<asp:ListView ID="NewUsers" runat="server" DataSourceID="NewUsersSDS" DataKeyNames="ID">
<LayoutTemplate>
[Code].....
View 1 Replies
Oct 27, 2011
I have a DataList inside another DataList. I want to access the child DataList "dlQuestion" events, ItemDataBound event. Also, I'm tring to find the control LableControl "lblQuestion" in the child datalist. How do I do that? Here's the mark-up:
<asp:DataList ID="dlSection" runat="server" Width="100%">
<ItemTemplate>
<div>
[code].....
View 2 Replies
Dec 2, 2011
[code]I want to print the parent item index inside the child repeater (rptAlternativas) in VB right in ITEM_INDEX_HERE marker. How can I achieve this?
View 1 Replies
May 26, 2009
Does anyone know if you can index controls now in vb.net?You could do it in VB6 - where you would have 6 radio buttons and if you copied the 1st it would ask you did you want to index the control.So you would have optName(0), optName(1), optName(2).... optName(5)It was useful to do a select case on the controls or else do a For loop on them either.I can't see anyway to do this in vb.net now, is there a way to do it? Or a workaround for this?
View 5 Replies
Jun 1, 2010
I have a panel with pictureboxes in it. And I'm using
vb
DirectCast(Panel1.Controls(indexNumber), PictureBox).Image
to assign images to them. But the indexes are a bit messed up and I would like to arrange them a bit nicer. Is it possible?
View 5 Replies
Jan 15, 2010
I am trying to create a way to use my arrow keys to move around some text boxes. The form has 12 textboxes moving from left to right with 4 in each row. Tab Index will be like this.
0 1 2 3
4 5 6 7
8 9 10 11
In the code I have figured out how to find the current tab index but I am having trouble moving to the next control based on which arrow key is pressed. Here is the code I have so far.
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Message, ByVal keyData As System.Windows.Forms.Keys) As Boolean
'This variable holds the current tab index for the control that has focus.
[Code]....
I commented the area where I haven't been able to figure out how to code it. I have spent a few days working this out and have spent the past 6 hours working on this part.
View 4 Replies
Nov 24, 2010
I created a groupbox and then populate it with buttons during runtime. I also created a button, say Button1 to loop through the groupbox and delete those buttons.[code]...
View 2 Replies
Dec 18, 2010
I have a checkbox and a panel inside of a FormView control, and I need to access them from the code behind in order to use the checkbox to determine whether or not the panel is visible. This is the code that I originally used, but since I put the controls inside of the FormView, it no longer works.
Protected Sub checkGenEd_CheckedChanged(ByVal sender As Object, _
ByVal e As System.EventArgs)
If checkGenEd.Checked = True Then
[Code]....
There aren't any errors anymore, but nothing happens when I click the checkbox. I think there needs to be some kind of event to trigger it but I don't know how you can put an event handler inside of an event handler.
View 2 Replies
Jan 11, 2012
Let's say we have a composite web control with a combobox and a textbox. Is it possible to build into the control functionality such that when the text in the textbox changes, it posts back and adds the value as an option in the combobox?
I know that I could add an "onchange" handler to the textbox and make something work with Javascript, but that's not really what I'm looking to do. Is there a way to just put like:
CODE:
In the web control code and it connect to the TextChanged event of the textbox?
View 1 Replies
Dec 30, 2009
But I don't know if i posted this at the right place. I am making 40 textboxes inside a panel. And this textboxes I set it to visible=FALSE. Then I have another textbox named txtNoteam in which once the user will enter a number in this txtbox which is less than or equal to 40, those textboxes will be set to true starting from textbox1 to textbox40 depending on the number entered by the user. Example: user enters 3, then textbox 1 to textbox 3 will be set to visible.
I was successful in doing this except one thing, instead of textbox 1 to textbox 3 will be set to visible, it's the textbox 38 to textbox 40 will be set first. This means it will start from the last textbox to the first textbox instead of from textbox1 to the last textbox.
I need your help on what should I do for this to be able to set it to visible from the 1st textbox to the last textbox or is there any other ways of doing this?
[Code]...
View 3 Replies
Jul 8, 2009
I have a problem. Controls is put inside form but don't appear when debug? I don't know what happened but. I put a Checkbox control and a button control named Button 3 on the my existing form. But when I debug the application. The Checkbox and Button 3 controls did not appear in the form? I try to put a message box which will be activate when Button 3 is clicked. I put a breakpoint there and I got this message. Breakpoint cannot be hit?
View 1 Replies
Jun 26, 2009
I am trying to access controls that were added to the form and created code all before I added them to a panel. Upon form loading I create the form handle into a dictionary. then I call that dictionary ID and add data to the controls. I can't seem to add data to the controls inside the panel.. I think it is something simple. I may just be over looking the method I need to call.
View 11 Replies
Jul 10, 2011
I'm trying to enable/disable controls inside a repeater:
<asp:Repeater ID="Repeater1" OnItemCommand="RepeaterItemCommand" runat="server">
<HeaderTemplate>
<table>
<th>
[code]....
View 2 Replies
Sep 8, 2009
I want to set the value of x that is the location of the controls inside a selected usercontrol at runtime. i want to set it to be 0 when there is no control on the usercontrol and i want it to be x += control.width. how can i do this, maybe how can i detect that there is a control inside the usercontrol.
View 8 Replies
Feb 13, 2012
drawing shapes on a picture box then saving them.
My current situation: I have a scrollable picturebox (achieved using panel + picturebox). On top of the image inside the picturebox I've added labels on different locations(the labels are added on run-time using PictureBox1.Controls.Add etc). I want to save the contents as well as the image inside the picturebox.
View 13 Replies
Jun 3, 2012
Let's say I make an application where the window (by default) is 1280x720, but the user is able to resize as How can I make the controls inside the application, resize according to the main window?
View 2 Replies
Jun 6, 2012
been trying to find examples of how to go about auto sizing the controls i have within a grid control if the users screen is larger than the default size.Currently i am unable to resize the controls when i enlarge the form. Is there any code currently that can find all controls inside the grid and resize them on the fly when the form is resized?My current code is:
<Window x:Class="Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
[code].....
View 1 Replies
Sep 27, 2010
Inside a form, I would like to display a pdf file which is already available in my resources (template file "untitled"). In this pdf file, I have some fields which get their values from some texboxes in another form. My aim is, when the user triggers the button to call this form, it should insert the values inside the pdf file and display the output pdf inside the form.I have written the code to an extend but could not finish it myself after my many trials... Now here are the two things I cannot manage:I can use a directory to read the template pdf "untitled1.pdf". But my aim is to use the file inside my resources. can save the output file in a directory but this is not I want to do. I want to display the output pdf.
View 1 Replies
Jan 1, 2011
I am writing an application and I do not know how to reference a group of controls inside a group box. I will include the code I have written so far and a picture with a detailed explanation as to what I am trying to do. Feel free to comment on any discrepancies that you may notice in my code.
Code:
Public Class Form1
' The following class-level constants are used
' to calculate the price of the model
Const decCOUPE As Decimal = 18000
[code].....
View 3 Replies
Apr 23, 2012
i am having trouble putting a value in a textbox. Each time a ticket is sold i put the total price in a textbox, each time a ticket is sold for the same concert it increases by adding its self to the total price. It works at the first sale, but after that it breaks down. here is the code
Private Function DisplayMoneyTaken() As Integer
Dim totalMoney As Integer
'open the database connection
[Code].....
View 1 Replies
Oct 23, 2009
Getting error filling grid view from reading through data table:
Dim myDataTable As DataTable = myDataSet.Tables("SunTrust")
Dim myRow As DataRow
Dim i As Integer = 1
Try
[code]....
Error:Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index
View 7 Replies
Dec 9, 2009
I am using Sub to format datagridview but during Form_Load this error occur. There are rows in datasource and dg.row.count is > 0.
.Columns(0).Width = 50 <==== ERROR HERE
.Columns(1).Width = 150
.Columns(2).Width = 80
.Columns(0).HeaderText = "ID"
[code].....
View 1 Replies
Jan 22, 2009
What im trying to do is send vars to a flash file.The following is my code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim oTitle As New ArrayList
Dim oSub As New ArrayList
Dim oRate As New ArrayList
[code]....
What I'm expecting the output to display is something like "t1=value&s1=value&r1=rate&t2=value&s2=value&r2=rat&t3=value&s3=value&r3=rat" But... i keep getting this exception: index was out of range. must be non negative and less than the size of the collection. Parameter name: INDEX.
View 3 Replies
Aug 25, 2011
I have a datagridview, with 3 columns, each containing dropdown filters (in the column header). Of the 3 columns, 2 are working perfectly fine, but whenever I try to filter the 3rd column, it gives me this error: (Also all of the column's have the ColumnType property set to: DataGridViewAutoFilterTextBoxColumn) "Index was out of range. Must be non-negative and less than size of the collection. Parameter name: index." The error points to the part that begins with "If dgv1.Rows(e.RowIndex)..."
Private Sub dgvWPS_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles dgv1.CellFormatting
If e.ColumnIndex = 1 Then
[code]....
View 3 Replies
Apr 13, 2010
i am trying to get the value into the cur_stock where item_id = datagrdiview.curentcell.value.I am lookin out for the solution since couple of days, but couldnt figure it out.Well, m trying to make this work on CellMouse click event
Below is my vb.net code:
Private Sub DataGridView_stockout_CellMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView_stockout.CellMouseClick
Dim i As Integer = Stock_checkDataSet1.Tables(0).Rows.Count - 1
[code]....
View 18 Replies
Apr 30, 2012
Trying to input a high setpoint, low setpoint, a % load, and number of compressors, then calculate the temp that all compressors are off. Then build a datagridview with the staging of compressors from all off to all on for each compressor up to 10 compressors.I am trying to insert headers from 1 to 10 compressors (Variable) with the text "Comp1", "Comp2", etc....Two rows with header. I am trying to use an array with index number to insert the text, but that is where my problem happens."Index was out of range".Here is my code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Integer, num1, num2, num3, num4, alloff As Single, stg As Single
TextBox1.Focus()[code].....
View 4 Replies
Mar 5, 2009
I've got the web browser with tabs in all working fine, but there's one bug, i can add tabs, delete em, etc.. but when i delete a tab then go to create a new tab, it gives me the error: InvalidArgument=Value of '6' is not valid for 'index'. Parameter name: index '6' is the number of tabs i had open.Here's the bit of code i use to create the tabs with the browser in it:
vbcode
Dim browse As New WebBrowser
browse.Name = "b1"
browse.Dock = DockStyle.Fill
[code]....
View 2 Replies
Jul 26, 2009
When the selected index changes I for a second time this code errors.
vb.net
lvReports.SelectedItems.Item(0).SubItems.Item(2).Text
with this error message
InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index
Why is this?It worked for the listviews.click event perfectly.
View 2 Replies
Nov 14, 2010
I am coding a program for a movie trivia game that randomly shows a movie quote and the the user selects a movie name from a combo box that matches. I used a array for the movie quotes and a comboBox for the movie names. I have coded a portion of the program but I am stuck on how to compare the array quote being shown to what movie the user selects from the comboBox. I have tried numerous different things but none seem to work right. The way I have it coded now it shows that every movie I pick that it is right even if it is wrong. I am going to show part of the code here and also attach the entire solution for anyone that needs it .
[Code]...
View 6 Replies