Solved

How to change the location of Listbox using code

Posted on 2008-10-09
4
902 Views
Last Modified: 2012-05-05
i am using datagrid and when i click in first row 3 column it shld show the list box in its original position and for next time in next line in same column it shld show in different location like it shld x-axis by 1 and y axis by 20.so can u plz help me
0
Comment
Question by:mahmood66
  • 2
  • 2
4 Comments
 

Author Comment

by:mahmood66
ID: 22677763
i want add the x axis and y-axis
0
 
LVL 11

Expert Comment

by:ladarling
ID: 22678112
This example will move the listbox 10 pixels down, 20 pixels right.

Dim p As Point = ListBox1.Location
p.X += 10
p.X += 20
ListBox1.Location = p
0
 
LVL 11

Accepted Solution

by:
ladarling earned 300 total points
ID: 22678128
Sorry, got that backward (and left off the Y...lol) Should look like:

Dim p As Point = ListBox1.Location
p.X += 10
p.Y += 20
ListBox1.Location = p
0
 

Author Closing Comment

by:mahmood66
ID: 31504612
thx a lot
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now