You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: devDocs/technicalDesignOverview.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,44 @@ NVDA has its own graphical user interface to allow for easy configuration and ot
208
208
This code is primarily contained in the `gui` package.
209
209
[wxPython](http://www.wxpython.org/) is used as the GUI toolkit.
210
210
211
+
#### Common GUI bugs
212
+
213
+
##### Controls are invisible or clipping
214
+
215
+
Adding controls to the wrong parent will cause them to visually clip or become invisible.
216
+
Adding controls to a ``wx.StaticBoxSizer`` by adding them to its parent causes undefined behaviour.
217
+
This has caused problems with users with right-to-left language locales.
218
+
wxWidgets requires that these items be added directly to the `StaticBox` associated with the `wx.StaticBoxSizer` via `GetStaticBox()`.
219
+
220
+
**Before (buggy behaviour):**
221
+
222
+
```python
223
+
sizer = new wx.StaticBoxSizer(wx.VERTICAL, parent, "Test")
224
+
sizer.Add(wx.StaticText(parent, wx.ID_ANY, "Where am I?"))
225
+
sizer.Add(wx.Button(parent, wx.ID_ADD))
226
+
```
227
+
228
+
**After:**
229
+
230
+
```python
231
+
sizer = new wx.StaticBoxSizer(wx.VERTICAL, parent, "Test")
232
+
sizer.Add(wx.StaticText(sizer.GetStaticBox(), wx.ID_ANY, "Where am I?"))
PR [#12181](https://github.com/nvaccess/nvda/pull/12181) is an example of fixing this.
237
+
238
+
##### Event handlers are firing unexpectedly or failing to fire
239
+
240
+
When event handlers are firing unexpectedly or failing to fire, refer to the [wxWidgets documentation for event propagation](https://wiki.wxpython.org/EventPropagation).
241
+
242
+
Notably:
243
+
* Event handlers stop propagation.
244
+
- If `event.Skip()` is called in an event handler, propagation will continue.
245
+
*`wx.CommandEvents`, a subset of wxEvents, will propagate up to the parent dialog by default.
246
+
- If a child control performs an event, a parent event handler may fire.
247
+
PR [#13117](https://github.com/nvaccess/nvda/pull/13117) is an example of a bug caused by this being fixed.
248
+
211
249
### Configuration management
212
250
NVDA includes an extensive configuration management facility including various preferences dialogs, ability to apply a given configuration in apps and so forth.
213
251
The base configuration options, as well as routines that manage configuration profiles and other management routines are housed in the `config` package, and NVDA uses [ConfigObj](http://www.voidspace.org.uk/python/configobj.html) to store configuration options.
0 commit comments