| Home | Trees | Indices | Help |
|
|---|
|
|
1 # Copyright 2006 James Tauber and contributors 2 # Copyright 2009 Luke Kenneth Casson Leighton 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 20 2527 ALIGN_BOTTOM = "bottom" 28 ALIGN_MIDDLE = "middle" 29 ALIGN_TOP = "top" 30 ALIGN_CENTER = "center" 31 ALIGN_LEFT = "left" 32 ALIGN_RIGHT = "right"33355937 """ use this to apply properties as a dictionary, e.g. 38 x = klass(..., StyleName='class-name') 39 will do: 40 x = klass(...) 41 x.setStyleName('class-name') 42 43 and: 44 x = klass(..., Size=("100%", "20px"), Visible=False) 45 will do: 46 x = klass(...) 47 x.setSize("100%", "20px") 48 x.setVisible(False) 49 """ 50 if kwargs: 51 for prop in kwargs.keys(): 52 fn = getattr(self, "set%s" % prop, None) 53 if fn: 54 args = kwargs[prop] 55 if isinstance(args, tuple): 56 fn(*args) 57 else: 58 fn(args)
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Sep 9 20:18:47 2009 | http://epydoc.sourceforge.net |