Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - TrackControl using Markup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TrackControl using Markup

 Post Reply Post Reply
Author
Message
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Topic: TrackControl using Markup
    Posted: 03 May 2012 at 7:00am
Hi,

I have been playing around with the Codejock MarkupPad to create a ProgressBar that can be inserted into the Block.Caption within the TrackControl. I have managed to get this to work however I am now stuck because I can't seem to get the length of the Blocks at runtime, the TrackControl is zoomable so therefore the Blocks change length as the control is zoomed.

So does anyone know of a way to get a Blocks length when the TrackControl is zoomed in and out?

I am setting the ProgressBar width as Block.length but this is then auto zoomed to the best fit by default therefore the width is wrong and unfortunately the Markup won't allow Width='100%' Confused

Any ideas are appreciated!!!



Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 03 May 2012 at 2:34pm
What if you try Width='Auto'?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2012 at 11:52am
I had tried the Width='Auto' but it didn't work in the approach I had taken, which was using the <Canvas> element.

I have instead opted for a <Grid> element as this allows you to set the <ColumnDefinition Width='100*'></ColumnDefinition> 100* being 100%

This has allowed me to get the ProgressBar within the TrackBlock resizing correctly.

See screenshot below:


Note: There is a slight discrepancy in the ProgressBar value when zooming. But it's as near as damnit! I will see if I can tighten this up before I upload this version.

Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2012 at 10:48pm
Hi Xander75,

Glad you got it (mostly) working - maybe one of the progress bars in these threads will work for you 100%?:

http://forum.codejock.com/forum_posts.asp?TID=14983&title=markup-user-interface-ideas
http://forum.codejock.com/forum_posts.asp?TID=11171&title=com-vb-xaml-progressbar-demo
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Xander75 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 April 2007
Status: Offline
Points: 353
Post Options Post Options   Thanks (0) Thanks(0)   Quote Xander75 Quote  Post ReplyReply Direct Link To This Post Posted: 05 May 2012 at 6:47am
After some tweaking of the aspect ratio code I have got it working quite well, if anyone can improve upon the zoom ratio code then please feel free to do so.

Here's the code: uploads/2960/TrackControl_Using_Markup.rar

Here's the final screenshot:

Product: Xtreme SuitePro (ActiveX) v15.3.1
Platform: Windows 7 64-bit (SP1) Professional Edition
Languages: C#.Net using Visual Studio 2012 & Visual Basic 6.0 (SP6)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.