Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uunet!snorkelwacker!bloom-beacon!ZIA.AOC.NRAO.EDU!cflatter From: cflatter@ZIA.AOC.NRAO.EDU (Chris Flatters) Newsgroups: comp.windows.x Subject: Re: XView questions...... Message-ID: <9010111517.AA10861@zia.aoc.nrao.edu> Date: 11 Oct 90 15:17:41 GMT Sender: root@athena.mit.edu (Wizard A. Root) Organization: The Internet Lines: 30 Ken Johnson writes: > I've created a frame which contains a panel and a canvas. I want the > panel to behave like an apple menubar. SO far I've gotten the canvas working > and two menu buttons in the panel. The problem is that the panel/menubar > is huge and make the window look like crap. I tried window_fit on the > panel and the frame and that doesn't help. ANy suggestions to shrink the > panel without having to hand code the size of the buttons and stuff? The window_fit macro (actually window_fit_height is more appropriate here) is equivalent to: xv_set (panel, WIN_FIT_HEIGHT, 0, WIN_FIT_WIDTH, 0, NULL); the WIN_FIT attributes take the margin to leave around the window contents. Zero is a special value which instructs XView to choose its own margin. It seems rather conservative in doing this. You should try setting WIN_FIT_HEIGHT explicitly rather than using the macros. xv_set (panel, WIN_FIT_HEIGHT, 1, NULL) will get you the narrowest possible panel. The margins above and below the buttons will be the same as for the OpenWindows file manager or mail tool. Chris Flatters