KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Text on a progress bar

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Thu May 18, 2006 3:26 pm    Post subject: Text on a progress bar Reply with quote

getting down on my knees....

Shawn

Can you please slip text output into the progress bar? While I can see other properties for the text, I only car about the text's forecolor.

kiss feet...

Thank you!

standing back up now....

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu May 18, 2006 3:48 pm    Post subject: Reply with quote

I'm already ahead of you Kelly. The version I just released has a brand new custom progressbar in it - but its hidden. Let me make a few minor tweaks and I will release it later today.

It wont have the Text forecolor yet - but we can talk about later.
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Thu May 18, 2006 3:57 pm    Post subject: Reply with quote

Thanks!
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu May 18, 2006 4:10 pm    Post subject: Reply with quote

The "problem" I am addressing with the Text forecolor is that we want the Text that is over the "bar" to be a different color than the text that is over the "background" (where the bar aint) - ja ?

For example, with a blue bar - you want the text over that to be white ... and for the text over the background, it has to be dark (like black).

Anyway, we can play with it later.

-Shawn
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Thu May 18, 2006 4:38 pm    Post subject: Reply with quote

Sure. Do I still at least get text over the progress bar? What property will set the text color? While you are messing with the progress bar can you look at borderstyle? I can't get it to change for me.
_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu May 18, 2006 5:05 pm    Post subject: Reply with quote

Not in the first release no. The Text color will be white over blue (over the bar) and black over the non-bar area. We'll talk later.

Sorry, yes - There will be text.
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu May 18, 2006 9:43 pm    Post subject: Reply with quote

Kelly, I am having work-work issues to deal and it may be that I cant get this release out tonight. Will advise.
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Thu May 18, 2006 11:29 pm    Post subject: Reply with quote

I can't ask for more than that.

Thanks!

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 20, 2006 5:23 pm    Post subject: Reply with quote

Ok Kelly - there is a new progressbar availble in the dev. build just uploaded.

There is only one way to create it right now, as follows:

$ProgressBar = $Form.Controls.Add("TextProgressBar")

Once testing is done etc, will rename the object to just "ProgressBar".

Can't change the text color (yet) - still thinking about. I am considering changing the meaning of ForeColor (which currently means the BarColor - to mean the color of the Text). And then create a new property called "BarColor" ... the problem is the two-color nature of the text forecolor - anyway, still thinking about.

Here is a test script:

Code:

Break On

$System = CreateObject(iif($dotnet,"Kixforms.Application","Kixtart.System"))

$Form = $System.Form()
$Form.Width = 400
$Form.Height = 400

$ProgressBar1 = $Form.Controls.Add(iif($dotnet,"ProgressBar","TextProgressBar"))
$ProgressBar1.Style = 0
$ProgressBar1.Value = 0
$ProgressBar1.Style = 1
$ProgressBar1.Width = $Form.ClientWidth - 20
$ProgressBar1.Center
$ProgressBar1.Dock = "Bottom"
$ProgressBar1.FontSize = 12
$ProgressBar1.Maximum = 100

$ProgressBar2 = $Form.Controls.Add(iif($dotnet,"ProgressBar","TextProgressBar"))
$ProgressBar2.Dock = "Left"
$ProgressBar2.Width = 30
$ProgressBar2.Style = 0
$ProgressBar2.Value = 0
$ProgressBar2.Style = 0
$ProgressBar2.Maximum = 100
$ProgressBar2.Orientation = 1
$ProgressBar2.FontSize = 12

$Timer = $System.Timer()
$Timer.Interval = 300
$Timer.OnTick = "Timer_Tick()"

$Form.Center
$Form.Show
$Timer.Start

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function Timer_Tick()

 If $ProgressBar1.Value = $ProgressBar1.Maximum
  $ProgressBar1.Value = 0
  $ProgressBar1.Style = iif($ProgressBar1.Style = 0,1,0)
  $ProgressBar1.BackColor = RND(155), RND(255), RND(255)
  $ProgressBar1.ForeColor = RND(155), RND(255), RND(255)
 Endif

 $ProgressBar1.Value = $ProgressBar1.Value + 10
 $ProgressBar1.Text = "" + $ProgressBar1.Value + "% Done"


 If $ProgressBar2.Value = $ProgressBar2.Maximum
  $ProgressBar2.Value = 0
  $ProgressBar2.Style = iif($ProgressBar2.Style = 0,1,0)
  $ProgressBar2.BackColor = RND(155), RND(255), RND(255)
  $ProgressBar2.ForeColor = RND(155), RND(255), RND(255)
 Endif

 $ProgressBar2.Value = $ProgressBar2.Value + 10
 $ProgressBar2.Text = "" + $ProgressBar2.Value + "% Done"

EndFunction


-Shawn
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Sat May 20, 2006 5:23 pm    Post subject: Reply with quote

Here is an even more fun script:

Code:

Break On

$System = CreateObject(iif($dotnet,"Kixforms.Application","Kixtart.System"))

$Form = $System.Form()
$Form.Width = 400
$Form.Height = 400

$DockIndex = 0
$DockArray = "top", "right", "bottom", "left"

For $i = 1 To 25

 $ProgressBar = $Form.Controls.Add("TextProgressBar")
 $ProgressBar.Value = 0
 $ProgressBar.Style = 1
 $ProgressBar.Width = 30
 $ProgressBar.Dock = $DockArray[$DockIndex]
 If $ProgressBar.Dock = 3 Or $ProgressBar.Dock = 4
  $ProgressBar.Orientation = 1
 Endif
 $ProgressBar.FontSize = 10
 $ProgressBar.Maximum = 100

 $DockIndex = iif($DockIndex = UBound($DockArray), 0, $DockIndex+1)

Next

$Timer = $System.Timer()
$Timer.Interval = 300
$Timer.OnTick = "Timer_Tick()"

$Form.Center
$Form.Show
$Timer.Start

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function Timer_Tick()

 For Each $ProgressBar In $Form.Controls

  If $ProgressBar.Value = $ProgressBar.Maximum
   $ProgressBar.Value = 0
   $ProgressBar.Style = iif($ProgressBar.Style = 0,1,0)
   $ProgressBar.BackColor = RND(155), RND(255), RND(255)
   $ProgressBar.ForeColor = RND(155), RND(255), RND(255)
  Endif

  $ProgressBar.Value = $ProgressBar.Value + 10
  $ProgressBar.Text = "" + $ProgressBar.Value + "% Done"

 Next

 Exit

EndFunction
Back to top
View user's profile Send private message
krabourn
KiXforms Aficionado
KiXforms Aficionado


Joined: 05 Mar 2003
Posts: 273
Location: San Antonio. TX

PostPosted: Mon May 22, 2006 1:45 pm    Post subject: Reply with quote

Everything is working. Very Happy The only "bad" thing so far is that I need to change one of my progress bars background color from yellow to something darker. If that is my worst problem, I can work around that.

Thanks!

_________________
Kelly
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group