Page 1 of 1

StatusBar Problem

Posted: Sun May 27, 2012 3:18 pm
by Darren
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!!!

StatusBar Problem

Posted: Sun May 27, 2012 3:50 pm
by Marco
hi you use statusbar.simplepanel=true that is in fact one panelmode, set simplepanel to false that is the multipanelmode.

best regards

StatusBar Problem

Posted: Sun May 27, 2012 4:29 pm
by Darren
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

StatusBar Problem

Posted: Mon May 28, 2012 3:25 pm
by Marco
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