home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17750 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  3.0 KB

  1. Path: sparky!uunet!mcsun!news.funet.fi!funic!sauna.cs.hut.fi!news.cs.hut.fi!s37732v
  2. From: s37732v@snakemail.hut.fi (Markus Juhani Aalto)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: How do you resize GadTools gadgets??
  5. Date: 23 Dec 92 16:25:33 GMT
  6. Organization: Helsinki University of Technology, Finland
  7. Lines: 59
  8. Distribution: inet
  9. Message-ID: <S37732V.92Dec23182533@lk-hp-19.hut.fi>
  10. References: <gel36.725059209@matapedia>
  11. NNTP-Posting-Host: lk-hp-19.hut.fi
  12. In-reply-to: gel36@gel.ulaval.ca's message of 22 Dec 92 21:20:09 GMT
  13.  
  14. In article <gel36.725059209@matapedia> gel36@gel.ulaval.ca (Usager temporaire) writes:
  15.  
  16.    I'm working on a resizable window and I need to resize
  17.    my listviews whenever I get a NEWSIZE message.
  18.    Is there a way I can resize the listviews without having
  19.    to use FreeGadgets() and CreateGadget() to rebuild all
  20.    my gadgets?
  21.  
  22. No.
  23.  
  24.    Why are the GFLG_RELWIDTH, GFLG_RELBOTTOM, etc... flags
  25.    filtered by Gadtools??
  26.  
  27. Because GadTools doesn't support them. Atleast version 37 didn't.
  28.  
  29.    I found you could manually add these flags after creating
  30.    a gadget, but they only work with simple gadgets like
  31.    BUTTON, CHECKBOX, ... but they don't work with listviews.
  32.  
  33. Never add anything to gadtools gadgets. This is illegal thing to do. 
  34.  
  35.   I'd like to hear from someone who built a resizable window
  36.    with gadtoolsbox and was successfull with resizing...
  37.  
  38. Yes! What would you like to hear. :^) BTW: I didn't make it with GadToolsBox
  39. but with my 'bare hands'. :)
  40.  
  41. Okey here is a little description from F-Finder V2.0's main window interface.
  42.  
  43. 1.    It calculates how wide and high window has to be to fit gadgets into
  44.     window with requested font. This is Screen's font normally, but if
  45.     window is too small for that font, then it falls back to Topaz80.
  46.  
  47. 2.    Specify Min dimension for window after step 1.
  48.  
  49. 3.    Calculate gadgets. In F-Finder I used lots of calculations from step 1
  50.     in here.
  51.  
  52. This approach which in tends to be quite slow is quite 'easy' to implement
  53. and in my A500 it takes
  54. about 1.5 secs to create those gadgets. Refreshing after resize takes about
  55. the same time (which is almost exactly the same time as few progs with
  56. GZZ windows do). I could propably fit this to 1 sec if I would optimize it
  57. wiit assembly code, but I don't think its necessary. Anyway the results are
  58. quite nice and in my opinion the benefits are greater than the slowliness
  59. of gadget creation routines. And remember that with A3000 (or better) this
  60. wouldn't be even noticeable. (And when I uprade to new A4000 I couldn't
  61. care less :^).
  62. --
  63.  
  64.  
  65. **************************************************************************
  66. *         Markus Aalto              | Helsinki University of Technology  *
  67. *                                   |                                    *
  68. *  EMail: s37732v@vipunen.hut.fi    | Faculty of Electric Engineering    *
  69. *  Fax:   358-0-8746991 (Sometimes) |                                    *
  70. *                                   | Undergraduate in Computer Science  *
  71. **************************************************************************
  72.         
  73.