The toolbox Tabs gadget and writable field gadgets
Chris Johnson (125) 825 posts |
Are there any users of the toolbox tabbed gadget out there? In applications with e.g. paged settings dialogues, I originally used smaller windows attached to the main window as panes, with the pane being viewed at the time set by using a group of radio buttons. I have recently been converting these older applications to use the Tab gadget (I normally use the toolbox for wimp applications), which has worked very well up to now. The latest application I have been converting has run up against a problem. Several of the ‘panes’, destined to be tabbed, contain a number of writable fields. When the pane is attached to the tabbed gadget, the writable fields become inoperative. Clicking to place the caret often, but not always, leads to an error box ‘Input focus window not found’. This error appears to be raised by random applications, including such as ShareFS (maybe whatever is paged in when the click occurs). The caret is not then placed. On the occasions when the caret is placed in one of the writable fields without error, it is totally inoperative – every keypress goes in to a black hole. Any other gadgets in the pane (eg option buttons, number range etc) work as expected. This is the first time I have used writable fields in a tabbed gadget. Nothing has changed in the res template definitions of the ‘pane’ windows – they still work normally when used as conventional panes, rather than in a tabbed gadget. Am I missing something here? I do not see why a standard writable field gadget should stop working when in a tabbed gadget. |
Fred Graute (114) 645 posts |
I only get that error when trying to set the default input focus for the tab that is shown when the window opens, whether it’s in a gadget or an invisible focus. Setting the default focus for other tabs works fine. Moving the input focus with mouse or keyboard works fine in any tab. The error also occurs when trying to set the input focus in the first tab on receipt of the Window_AboutToBeShown event. It looks as if things are done in the wrong order; first set input focus then open window. Once the main window is open all the tab windows are there too so everything works fine when subsequent tabs are opened. |
Chris Johnson (125) 825 posts |
Thanks for the hints, Fred. It gives me food for thought while having another look at things. |
Chris Johnson (125) 825 posts |
I had a long session with this the other evening, and am no further forward. I cannot get writable fields to work when they are in a tab. There must be something I am doing wrong, but cannot for the life of me see what it is. I guess I will revisit this after the festivities are all done and dusted. |
Chris Johnson (125) 825 posts |
I think I have found the problem. When the ‘sub-windows’ are used as panes, then the pane flag in the window properties needs to be ticked. However, if the pane flag is ticked when the same template is used in the tabs gadget, then the writable icons fail to work. I was using the same res templates for the pane/tabbed windows while changing over. Having now unticked the flags everything seems to be working as I intended. |