473,503 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Move Dynamically generated labels

137 New Member
I have dynamically generated labels in my code. It is working fine. I want to change the position of those labels.
Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form10_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3.         Try
  4.             Dim c As Integer = 10
  5.             Dim l As Integer = 0
  6.             Dim lft As Integer = 20
  7.             For i = 1 To c
  8.                 For j = 1 To 8
  9.                     If l < c Then
  10.                         labelDemo = New Windows.Forms.Label
  11.                         labelDemo.Name = "label"
  12.                         labelDemo.Text = "Move"
  13.                         labelDemo.Left = lft
  14.                         labelDemo.AutoSize = True
  15.                         labelDemo.BackColor = Drawing.Color.Aquamarine
  16.                         Me.Controls.Add(labelDemo)
  17.                         l = l + 1
  18.                         lft = lft + 80
  19.                     End If
  20.                 Next
  21.  
  22.  
  23.             Next
  24.  
  25.             Me.ResumeLayout()
  26.         Catch ex As Exception
  27.         End Try
  28.     End Sub
  29.  
The above code will generate the labels. I am not able to move those labels. Any help will be helpful. I found some links that helps to move a label, but i want to move those dynamically generated labels.
May 10 '16 #1
2 1086
Luk3r
300 Contributor
Do you want to move a single label or move every label at the same time? The answer to this question greatly changes the code necessary.
May 10 '16 #2
coolminded
137 New Member
I need to move a label at a time. just need to interchange the position of some labels as needed.
May 11 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1572
by: alex | last post by:
I'm new to xslt, and I am attempting to use it to produce a comma-separated-value file from a large, dynamically-generated data file formatted in xml (examples of the xml file and my xslt style...
4
2865
by: EmmettPower | last post by:
Hi, I have a form which includes a field 'number'. When 'number' is changed additional fields ('item_0', etc) are generated on the form using 'onchange'. I want to validate the form using...
1
1562
by: Jack Black | last post by:
Not even sure where to start on this one... I need to be able to either: a) set up a SPAN around a dynamically-generated table row (using TableRow object), or b) apply an "onmouseover" property...
0
2522
by: Boris | last post by:
When I dynamically create CheckButtonList, I add ListItem(s) to my CheckButtonList object chkList chkList.Items.Add(new ListItem("My Text", "My Value")); The resulting HTML doesn't contain...
27
12995
by: ted benedict | last post by:
hi everybody, i hope this is the right place to discuss this weird behaviour. i am getting dynamically generated text or xml from the server side using xmlhttprequest. if the server side data is...
12
13121
by: vbnewbie | last post by:
I am having problems accessing properties of dynamically generated objects in VB2005. Can someone please help? In a nutshell: My app creates an equal number of checkboxes and labels that share the...
1
2236
verbatim
by: verbatim | last post by:
with the following page, the dynamically generated fields are not recognized when i try to submit the form, or add more elements. when i hit my submit button, the address bar has only x1 - x5 in...
7
2533
by: Srikanth Ram | last post by:
Hi, I'm creating a PHP application. In this a dynamic table with the fields in the database is generated in a page. I have placed a checkbox in each row of the table to approve/disapprove...
2
3303
by: mylog | last post by:
Hi I am having a problem of getting the value from the dynamically generated table and dropdownlist. What I am facing is, I have created a table in the aspx page and now I need to add values to...
9
2761
by: student4lifer | last post by:
Hello, could someone show me how to make sticky form with dynamically generated form element? for example, if one likes to make the dynamically generated check box (and its name) 'sticky' that...
0
7201
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,...
0
7083
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...
0
7278
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,...
0
7328
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...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
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,...
1
5011
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...
0
4672
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...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.