assigning location of object
-
i am trying to move a panel with:
pnlProgressBar.Location.X = pnlProgressBar.Location.X + 1;
for a progress bar. It is inside a while loop, but the following error occurs: "Cannot modify the return value of 'System.Windows.Control.Location' because it is not a variable" I want it to later be able to actually show the amount of progress it has actually made, but first i need it to be able to move. If anybody else has a better way of making a progress bar that is only one bar, unlike the built in progress bar, please tell me. thanks in advance.
-
i am trying to move a panel with:
pnlProgressBar.Location.X = pnlProgressBar.Location.X + 1;
for a progress bar. It is inside a while loop, but the following error occurs: "Cannot modify the return value of 'System.Windows.Control.Location' because it is not a variable" I want it to later be able to actually show the amount of progress it has actually made, but first i need it to be able to move. If anybody else has a better way of making a progress bar that is only one bar, unlike the built in progress bar, please tell me. thanks in advance.
dsl/fahk wrote:
Cannot modify the return value of 'System.Windows.Control.Location' because it is not a variable"
Location
returns aPoint
structure.Point
is immutable meaning once it has been created it cannot be changed. You have to assign a newPoint
to theLocation
property of the control.
Upcoming Scottish Developers events: * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos