Greetings fellow developers i just want to ask for help on how to slide the panel from right to left of the screen. I only know the sliding panel from left-to-right but is it possible to slide the panel from right-to-left?

When you say sliding the panel, do you mean in the parent control or the scroll bar of the panel?

In the parent control. like this for example

private slide_in()
do while panel1.width < 730
panel1.width += 1
loop

like this code but it only grows it's width from left-

If you are only wanting to increase the width (on the left) you will have to reposition the panel on resize to give the user the illusion it is only increasing the width on the left.

For exmaple:

Do While Panel1.Width < 730
    Panel1>Width += 1
    Panel1.Location = New Point(Panel1.Location.X - 1, Panel1>Location.Y)
Loop

You might want to consider a further check that X doesn't go less than zero. Something like:

Do While Panel1.Width < 730 andalso Panel1.Location.X > 0
commented: Very true! :) +8

Thank you sir! it worked!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.