显示标签为“extjs”的博文。显示所有博文
显示标签为“extjs”的博文。显示所有博文

20100126

Get the view size not window size in ExtJS

If your browser window contain a vertical scrollbar, using Ext.getBody().getWidth() will get the body size with the width of vertical scrollbar.
Example, if the body is 800px. and vertical scroll bar is 50px, so the vew size is only 750px.
If you set width of a component to 800px, you will see a horizontal scrollbar.
So lets use Ext.getBody().getViewSize().width (see docs for detail). It will give us the width of the region you see.

20091218

使用eclipse及其他来编辑ExtJS的工程

虽然最后放弃了这种臃肿的办法,不过使用过确实发现了优点还是有一些的:

1. 高亮显示当前光标所在的变量的所有同一个变量myMask,然后所有myMask变量的背景都变成了lightyellow,省得去一个一个的搜索了,一目了然。

2. 自动完成,能够根据定义好的类找到相应的方法,比如fp是一个FormPanel,输入“fp.g”就会出现“fp.getForm()”等方法。

3. 自动找类或者方法定义的地方,比如按住ctrl键,鼠标放在任意一个调用fp的地方,然后指针变成了手形,就好像这个fp是一个链接一样,然后点击之后就能跳到fp定义的地方“var fp = new Ext.FormPanel({...”。

4. 还有就是Elipse里面一些好用的快捷键,比如多行复制“ctrl+alt+上或者下方向键”,多行上下移动“alt+上或者下方向键”,删除多行“ctrl+D”。这些在UE里面只能处理单行。

配置上没什么好说的,直接去下载或者在Eclipse中配置如下URL即可:
Aptana - http://update.aptana.com/install/studio
PDT - http://downloads.zend.com/pdt
Spket - http://www.spket.com/update/