EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: BOY Data Browser Issues
From: "Chen, Xihui" <[email protected]>
To: "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 21 Sep 2011 14:20:09 -0400
>4.It would be nice if there was an option to dynamically resize the Data Browser widget at runtime (the Data Browser tab already does this).  I thought I could do it with some Javascript but I would need a way to get the current window's width.  display.getPropertyValue("width"); will just return the initial width set in the properties at edit time.  I would also need some way of triggering the javascript on a display size change.  Anyone know if that is possible in BOY?

The Display has a property "Auto Zoom to Fit All" will do what you want. If it is still not what you want, you can call some Java code in script like this:

importPackage(Packages.org.csstudio.opibuilder.scriptUtil);
importPackage(Packages.org.eclipse.swt.widgets);
importPackage(Packages.org.eclipse.swt);

var shell = Display.getCurrent().getActiveShell();
//Get shell size
var size;

listener = {
	handleEvent:function(event){
		
	size=shell.getClientArea();
	widget.setPropertyValue("width", size.width);
	widget.setPropertyValue("height", size.height);			

	}	

}

shell.addListener(SWT.Resize, new Listener(listener));

The script should be triggered only once, so you can set a constant PV is trigger PV, for example "1".

Hope this can help,
Xihui



Replies:
Re: BOY Data Browser Issues Craig.Haskins
References:
BOY Data Browser Issues Craig.Haskins

Navigate by Date:
Prev: RE: Time, technology and leaping seconds nick.rees
Next: Re: BOY Data Browser Issues Craig.Haskins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: BOY Data Browser Issues Kasemir, Kay
Next: Re: BOY Data Browser Issues Craig.Haskins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·