StatusBar Problem

In this category you can exchange your programming questions and solutions.
Post Reply
Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

StatusBar Problem

Post: # 880Post Darren
Sun May 27, 2012 3:18 pm

Can anybody tell me why the following program does not work?

All I want to do is create a 2panel status bar.

OBJECT MainForm As Form
  Center
  BorderStyle=bsToolwindow
  ClientHeight=400
  ClientWidth=600
  OBJECT StatusBar1 AS StatusBar
    Width=384
    Height=19
    Panelwidth(0)=150
    Paneltext(0)="PANEL 1"
    Panelwidth(1)=150
    Paneltext(1)="PANEL 2"
    SimplePanel=True
  END OBJECT `{StatusBar1}
END OBJECT `{MainForm}

MainForm.ShowModal

Many thanks in advance!!!

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

StatusBar Problem

Post: # 881Post Marco
Sun May 27, 2012 3:50 pm

hi you use statusbar.simplepanel=true that is in fact one panelmode, set simplepanel to false that is the multipanelmode.

best regards

Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

StatusBar Problem

Post: # 882Post Darren
Sun May 27, 2012 4:29 pm

I am still getting a "List Index out of bounds"

are you getting the above example to work?

I have set the panel to false

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

StatusBar Problem

Post: # 883Post Marco
Mon May 28, 2012 3:25 pm

hi, you must first add a panel to use it this code must work.
don`t forget to set simplepanel to false.
best regards

OBJECT MainForm As Form
  Center
  BorderStyle=bsToolwindow
  ClientHeight=400
  ClientWidth=600
  OBJECT StatusBar1 AS StatusBar
    Width=384
    Height=19
    addpanel
    Panelwidth(0)=150
    Paneltext(0)="PANEL 1"
    addpanel
    Panelwidth(1)=150
    Paneltext(1)="PANEL 2"
    SimplePanel=false
  END OBJECT `{StatusBar1}
END OBJECT `{MainForm}
mainform.showmodal

Post Reply