473,651 Members | 2,630 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 1090
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
1596
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 sheet follow). It works pretty well, but xsltproc takes an extremely long time to process the data file when it grows fairly large (>1MB). I've read that using keys can improve processing time on large documents, however I don't know the number of...
4
2886
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 Javascript before submission. I've set out the part of the validation script used to loop through the dynamically generated fields below. This is where I am encountering
1
1577
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 to a given row in a dynamically-generated table. Any thoughts??? This is me looking perplexed (and no, don't say "Just put a DIV around it!")...
0
2527
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 value="My Value". Therefore, I can't access "My Value" with Request.Form on post back. I do get the desired outcome with my RadioButtonList object radioList when I do
27
13031
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 STATIC, i can have whatever size of data i want. but if the data (xml or text) is generated dynamically using php, then there seems to be a size limit! xmlhttprequest's responseText is truncated, and the xml therefore not well fromed. in border...
12
13195
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 same Tag number. (I thought it might help) The checkboxes name is a concatenation of "chkCancel" and a number that represents the order in which they were created: chkCancel0 (Tag = 0) chkCancel1 (Tag = 1)
1
2253
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 the query string, and does not append any of the dynamically generated fields. any ideas how to fix this? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd"> <html>
7
2540
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 according to spec. This checkbox is also created dynamically according to the fields in the database. Now I need to place a checkbox/ button (by checking the checkbox all the checkbox in the page has to be checked). I checked online and I was able to find...
2
3316
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 the the cells of the table respectively which I have done easily but the problem is when I add the dynamically generated dropdownlist to the cell I cannot read the value from the dropdownlist. For adding the dropdownlist in the cell I have done the...
9
2777
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 retains the value of the previously submitted value. How would one do that? TIA. I was thinking something along this line but not sure it's the right way to accomplish this task
0
8349
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...
1
8460
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
8576
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
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
6157
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
4143
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2696
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
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1585
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.