I don't know if I can help you at all.
However, about a year ago Juan sent me the following code snippet to help get me going with <TABS> in PJSR, but I never had time to pursue things. Perhap it may be of 'some' use to you, I don't know
#include <pjsr/Sizer.jsh>
#include <pjsr/FrameStyle.jsh>
#include <pjsr/TextAlign.jsh>
function RandomChars( howMany )
{
const c = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
const n = c.length;
var s = new String;
for ( var i = 0; i < howMany; ++i )
s += c[Math.round( Math.random()*(n-1) )];
return s;
}
function MyTabPageControl( parent )
{
this.__base__ = Control;
if ( parent )
this.__base__( parent );
else
this.__base__();
this.helpLabel = new Label( this );
this.helpLabel.frameStyle = FrameStyle_Box;
this.helpLabel.margin = 4;
this.helpLabel.wordWrapping = true;
this.helpLabel.useRichText = true;
this.helpLabel.text = "<p>This is a Control object inside a TabBox.<br/>" +
"This is a random string:<br/>" +
RandomChars( 40 ) + "</p>";
this.targetImage_Label = new Label( this );
this.targetImage_Label.text = "Target image:";
this.targetImage_Label.textAlignment = TextAlign_Right|TextAlign_VertCenter;
this.targetImage_ViewList = new ViewList( this );
this.targetImage_ViewList.getAll(); // include main views as well as previews
this.targetImage_ViewList.toolTip = "<p>This is just an example.</p>";
this.targetImage_Sizer = new HorizontalSizer;
this.targetImage_Sizer.spacing = 4;
this.targetImage_Sizer.add( this.targetImage_Label );
this.targetImage_Sizer.add( this.targetImage_ViewList, 100 );
this.sizer = new VerticalSizer;
this.sizer.margin = 6;
this.sizer.spacing = 6;
this.sizer.add( this.helpLabel );
this.sizer.addSpacing( 4 );
this.sizer.add( this.targetImage_Sizer );
}
MyTabPageControl.prototype = new Control;
function MyTabbedDialog()
{
this.__base__ = Dialog;
this.__base__();
this.pages = new Array;
this.pages.push( new MyTabPageControl( this ) );
this.pages.push( new MyTabPageControl( this ) );
this.pages.push( new MyTabPageControl( this ) );
this.pages.push( new MyTabPageControl( this ) );
this.tabs = new TabBox( this );
this.tabs.setMinSize( 400, 200 );
this.tabs.addPage( this.pages[0], "First" );
this.tabs.addPage( this.pages[1], "Second" );
this.tabs.addPage( this.pages[2], "Third" );
this.tabs.addPage( this.pages[3], "Fourth" );
this.okButton = new PushButton( this );
this.okButton.text = "OK";
this.okButton.onClick = function()
{
this.dialog.ok();
}
this.buttons = new HorizontalSizer;
this.buttons.addStretch();
this.buttons.add( this.okButton );
this.sizer = new VerticalSizer;
this.sizer.margin = 6;
this.sizer.spacing = 6;
this.sizer.add( this.tabs );
this.sizer.add( this.buttons );
this.windowTitle = "TabBox Example Script";
this.adjustToContents();
}
MyTabbedDialog.prototype = new Dialog;
var dlg = new MyTabbedDialog;
dlg.execute();
Cheers,