From: Oliver S. <oli...@si...> - 2011-09-29 20:58:32
|
I tried your suggestions, but none worked (always assuming I changed things properly). (1) I tried making more room for the menu, but that didn't work. (2) I tried connecting the size event at the end of initDialog instead of in the init method, but that didn't work. (3) I tried self~execute('HIDE') then both self~show() and self~show('SHOWTOP') at end of initDialog method, but that didn't work either. In both cases, the dialog blinked into sight then disappeared again. It wasn't minimized, and I had to kill the command prompt to end it. Any thoughts? Many thanks, Oliver PS: This is not a major problem, just an annoying one. There's lots more I can be getting on with. _____ From: Mark Miesfeld [mailto:mie...@gm...] Sent: 29 September 2011 13:46 To: Open Object Rexx Users Subject: Re: [Oorexx-users] Dialog does not open with correct size. Oliver, A couple of thoughts, but I might have to see your code. 1.) I noticed that you don't seem to be taking into account the height of a menu when you are using menus. Dialogs weren't originally, (and really still aren't,) intended to have menus. So when you add a menu it has the effect of pushing all the controls down the height of the menu. When you are planning on adding a menu, whether you are using resource editor or using UserDialog, you should make allowances for the menu. In a resource editor I usually make the bottom margin (the space between the lower edge of the lowest control) 10 dialog units larger. I.e., I normally use a margin of 10. When I'm going to add a menu I make the bottom margin 20. This is likely sufficient to solve your problem. 2.) When a dialog is first shown on the screen the operating system sends a size message to it. This event is what is sent when the user resizes the dialog using the sizing border. This will get passed on to the DlgAreaU class and it will resize and move the controls as it normally does, It is likely that, since DlgAreaU does not know about the space taken up by the menu, it resizes and moves the controls incorrectly. I'm not sure if this is happening, so it's one of those things I'd need to play with some working code. If this is the problem you could probably fix it by not connecting the size event until you leave initDialog(), 3.) Similar to #2. DlgAreaU does the initial resizing but for some reason the dialog is not getting repainted immediately. When you click the border, it causes the OS to repaint the dialog. Which is the effect you see of the list-view changing size and the buttons becoming visible. You might be able to fix this by a.) giving the dialog the invisible style (i.e., do not give it the visible style.) b.) having it show after initDialog() is finished. If #1 does not fix the problem, I would probably need to poke around a bit with the dialog to determine the actual problem. #2 and #3 are just guesses, and how to fix them is just a guess also. <grin> Have you already checked in the code? If so I'll just take a look at the dialog in the user guide section of the samples. -- Mark Miesfeld On Thu, Sep 29, 2011 at 6:35 AM, Oliver Sims <oli...@si...> wrote: In the User Guide's Exercise06, the Order Management dialog opens with the two pushbuttons at the bottom of the dialog window only half visible. When I click on the window border (no re-size - just a click) the ListView above the buttons becomes less tall, and the button become fully visible. I can't find a way of either getting the correct size of listview to appear, or of emulating in code the click on the border to make the lisview shrink to its proper starting size. Btw, the dialog is re-sizeable and uses DlgArea and DlgAreaU. Any thoughts? --Oliver ---------------------------------------------------------------------------- -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 _______________________________________________ Oorexx-users mailing list Oor...@li... https://lists.sourceforge.net/lists/listinfo/oorexx-users |