Thanks, Mark.

I wasn't sure where the division of responsibility lay between 
ooDialog and the underlying OS, or the difficulty of managing it.

IIRC, remembering the window size was an inherited property of a 
window in OS/2, so it could be enabled at a high level and overridden 
on an individual window.  Don't remember how realizability's was handled.

Thanks for all your explanations.  I'll have to look at Lee's code 
sometime.  There's nothing like having a good example to learn from.

-Chip-

On 1/5/12 15:23 Mark Miesfeld said:
> On Wed, Jan 4, 2012 at 10:12 PM, Chip Davis <c...@aviatrexx.com 
> <mailto:c...@aviatrexx.com>> wrote:
> 
>     ...
> 
>     One of my pet peeves as a user, however, are non-resizable windows
>     that are ignorant of the current font size.  Sometimes I use my laptop
>     to drive a digital projector and need to use a much larger font than
>     normal.
> 
>     Is there any valid reason for creating a non-resizable window?
> 
>     A second peeve is the resizable window that refuses to remember the
>     size I had to drag it to the last time.  Disk Defragmenter comes
>     immediately to mind.
> 
>  
>  
> Interesting comments Chip.  Your second peeve used to be a big one for 
> me too.  But, I don't think about it much any more.  I guess the apps I 
> use all the time now remember the size and position they were closed at.
>  
> Of the two, remembering the last size and position and opening the 
> window to that the next time is not real difficult.  You just save the 
> information when you close and read it back when you start up.
>  
> In ooDialog's case, you can use the .Properties class provided by ooRexx 
> to save and read back the information.  Making it even easier, you don't 
> have to write much saving / reading code.
>  
> Resizable dialogs are genuinely difficult, harder than a regular 
> window to some degree.  With a regular window, the programmer has 
> to write all the drawing code for the window.  Not that that isn't hard, 
> but it has to be done.  So adding resizing to that code is not a lot of 
> extra work.
>  
> With dialogs, the operating system, normally, handles all the drawing of 
> the both the dialog and the dialog controls.  So adding resizability (if 
> that's a word) is a lot of additional work.  Still, "a lot of additional 
> work" is precisely the problem frameworks are good at solving.
>  
> Applying the comments to ooDialog specifically.  Lee Pendin wrote a 
> graphical version of rexxtry using ooDialog.  This program is installed 
> with ooRexx.  It is both resizable and opens up in its last size and 
> position.  A demonstration that it is feasible to remove both of your 
> pet peeves.
>  
> Jon created two classes in ooDialog that handle most all of the work 
> of adding resizability to a dialog.  It is some very clever work.  
> However it does have some limitations.
>  
> It parses the the source code of the program to determine the size and 
> relative position of the dialog controls.  So it does not work with 
> dialogs created using a resource editor, only with dialogs created by 
> manually (in the code) laying out the dialog template (UserDialog.)  It 
> also flickers horribly when the user is resizing.
>  
> Both of these drawbacks are due to limitations in ooDialog, not Jon's 
> work.  As I said, it is a very clever implementation using what was 
> available to Jon.
>  
> Things related to drawing in a graphical UI are very performance 
> dependent.  The best way to do resizing would be to implement it in the 
> native C code (or C++ code) of ooDialog.  That is something on my list, 
> but it is a lot of work and has been further down my list.  I expect to 
> tackle it some time towards the end of this year.
>  
> The advantage of implementing it in the framework, is that once it is 
> done and debugged, then adding resizability to dialogs in ooDialog would 
> be pretty easy.
>  
> Leaving programmers no excuse for creating programs that aggravate you.  
> <grin>
>  
> --


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to