Rank: Advanced Member
Groups: Guest
Joined: 3/29/2010(UTC) Posts: 81
Thanks: 10 times
|
Hello... Can i able to check scrollbar is visible in the multilayer? now i am check with "multilayer.Scrollingposition.x >0, multilayer.Scrollingposition.y >0) .But its correct in zooming.. if i change the workspacewidth or height its not correct... How can i do this?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello,
Could you provide me with complete sample application please? |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/29/2010(UTC) Posts: 81
Thanks: 10 times
|
I have attached sample.. which is a button enabled when the scroll bar is visible , to check the visibility of scroll bar is possible only changing the zoom...
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello, Sorry for delayed answer. ScrollingPosition property gets the current position of the scroll bar. When you change width and height of the workspace, scroll bar is shown, but it has ScrollingPosition.X = 0, and ScrollingPosition.Y = 0 (the start coordinates (0; 0)). If you need to check whether scroll bar is visible, you can change its horizontal or vertical position a bit. Then ScrollingPosition.X will not be equal to zero. Edited by user Thursday, October 28, 2010 6:42:25 PM(UTC)
| Reason: Not specified |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 3/29/2010(UTC) Posts: 81
Thanks: 10 times
|
Thanx..........then how can i do this? pls explain with sample code..................
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 5/29/2010(UTC) Posts: 1,310
Thanks: 8 times Was thanked: 111 time(s) in 111 post(s)
|
Hello, Here is code snippet shows how to change position of scroll bar: Code:
private void textBox1_TextChanged(object sender, EventArgs e)
{
try
{
multiLayerViewer1.WorkspaceWidth = Convert.ToInt32(textBox1.Text);
multiLayerViewer1.Scroll(1, 1);
//-------------------//
if (multiLayerViewer1.ScrollingPosition.X > 0 || multiLayerViewer1.ScrollingPosition.Y > 0)
button1.Enabled = true;
else if (multiLayerViewer1.ScrollingPosition.X == 0 && multiLayerViewer1.ScrollingPosition.Y == 0)
button1.Enabled = false;
}
catch (Exception ex)
{ }
}
I checked it. Scroll bar was defined, and button was enabled. Please try it. If you have any additional questions please let me know. |
Best regards, Dmitry Obukhov
Technical Support. Aurigma, Inc.
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 11/8/2010(UTC) Posts: 3
|
maybe in google you can find better ways! |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.