Hi all,

I have used a status bar on my frame developed in BOA Constructor. I want to split my status bar into two parts in proportion of .75 and .25 i.e., First part should be 75% and 2nd part should be 25% of the total. And then at various places in my code I want to set the messages to each of the parts separately. Example: Part1=’Hello’; Part2=’Bye’. How can I do this?

Regards,
Dinil

Hi all,

I used the following code to split the status bar.

self.CreateStatusBar()
self.StatusBar.SetFieldsCount(2)
self.StatusBar.SetStatusWidths([-3, -1]) #Or positive numbers if absolute width

But instead of setting a text message like self.SetStatusText("Hello",0), I want to set a number in the first argument of SetStatusText. Something like this:

for intiLoopIndex in range(0,100)

#Increment setValue
setValue=setValue+1

if setValue <98:
self.gauge1.SetValue(setValue)
self.statBar.SetStatusText(setValue,1)

Presently I am getting errors here!
Is this possible to do?
Please help!

Regards,
Dinil

What errors are you getting and where?

I've used this in the past for splitting a Status Bar and writing text to the last section (ie [ Index 0 | Index 1 | Index 2 ] ):

self.sb = self.CreateStatusBar(3)
self.sb.SetStatusWidths([-2, -1, 150])
self.SetStatusText('My Text', 2)

SetStatusText is not a function of the status bar but of the frame containing said status bar, which may be the reason for your error.

HTH

Hi... Thanks all for ur replies.
I used:
self.statBar.SetStatusText(str(setValue),1)

This converts setValue into a string which was previously an integer!

Thanks once again!

regards,
Dinil

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.