Solved

How to change the location of Listbox using code

Posted on 2008-10-09
4
905 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that undeā€¦
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.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

809 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