Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to change the location of Listbox using code

Posted on 2008-10-09
4
Medium Priority
?
914 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 1200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show, step by step, how to integrate R code into a R Sweave document
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

971 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