(self)
| 261 | style.element_create('block2', 'image', image, spam=1) |
| 262 | |
| 263 | def test_element_create_vsapi_1(self): |
| 264 | style = self.style |
| 265 | if 'xpnative' not in style.theme_names(): |
| 266 | self.skipTest("requires 'xpnative' theme") |
| 267 | style.element_create('smallclose', 'vsapi', 'WINDOW', 19, [ |
| 268 | ('disabled', 4), |
| 269 | ('pressed', 3), |
| 270 | ('active', 2), |
| 271 | ('', 1)]) |
| 272 | style.layout('CloseButton', |
| 273 | [('CloseButton.smallclose', {'sticky': 'news'})]) |
| 274 | b = ttk.Button(self.root, style='CloseButton') |
| 275 | b.pack(expand=True, fill='both') |
| 276 | self.assertEqual(b.winfo_reqwidth(), 13) |
| 277 | self.assertEqual(b.winfo_reqheight(), 13) |
| 278 | |
| 279 | def test_element_create_vsapi_2(self): |
| 280 | style = self.style |
nothing calls this directly
no test coverage detected