From: Joel K. <joe...@gm...> - 2007-08-28 18:23:34
|
Hello Hans, I'm no expert, but since I've been slugging away at my own gtk2hs progs recently, I'll take a crack at your questions. On 8/29/07, Hans van Thiel <hth...@zo...> wrote: > The Entry widget does not have an onChange signal mentioned in the API > documentation. Is there a signal to indicate additon or deletion of a > character? Entry is an instance of EditableClass, so you can use onDeleteText and onInsertText. > There is an onToggleOverwrite signal, but no related methods or attributes > are listed. Does a mode for overwrite/insert exist, or does this signal have > an other meaning? I can switch by pressing the Ins key. Not sure how to do it programmatically. > There is an entryEditable attribute, but no method to set or get it. See http://haskell.org/gtk2hs/docs/gtk2hs-docs-0.9.12/System-Glib-Attributes.html for how to deal with attributes. > In the class hierarchy of Entry, Widget is listed as the parent. But in the > Editable documentation, Entry is listed, with SpinButton, as an instance of > EditableClass. The Detail section in the API states Editable is 'an > interface which should be implemented by text editing widgets such as > Entry'. But it appears several methods have been implemented in > EditableClass (editableInsertText, editableSetEditable etc.) How should > Editable (or EditableClass) be used with Entry? On the Entry doc page, just below the Class Heirarchy, there's the docs of the Entry type. It tells us that Entry is an instance of EditableClass, so you can just use the Editable functions directly. -- Joel |