From: Neil H. <nho...@bi...> - 2001-09-04 04:32:16
|
Something I like to see in user interfaces is live updating where attributes are changed as the user fiddles with them rather than requiring pressing an "Apply" button. To this end, the property editor can be changed to apply changes to the text areas and check boxes immediately by adding this just after the EVT_BUTTON section of debug.py: EVT_TEXT(self, self.wTextArea.GetId(), self.onSelectUpdate) EVT_TEXT(self, self.wField.GetId(), self.onSelectUpdate) EVT_CHECKBOX(self, self.wChecked.GetId(), self.onSelectUpdate) To make the font and colour dialogs take immediate effect, add self.onSelectUpdate(event) as the last line of onSelectColor and onSelectFont inside the if dlg.accepted() condition. A problem with this is that some settings such as the file names used within image controls will cause error messages with partially updated file names. Mostly, these should be changed to just silently handle failure or perhaps have a status area indicator that the field is invalid. For file names, the file open dialog should ensure that only valid file names are applied and this has the advantage of being able to select files rather than just type their names. I haven't changed CVS as there may be other opinions and this change could be made an option instead of always being on. Neil |