Solved

How to change the location of Listbox using code

Posted on 2008-10-09
4
911 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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 …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

623 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