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