On Monday, October 4, 2004, at 11:45 AM, Bernie Wylde wrote: > Hi boys, > > The example builds a group popup control. Two questions: > > (1) How do I reduce the width of the popup part? > > (2) If I set the max value to -1(to calc the title width > automatically), the first time the popup is clicked, it shrinks > slightly. Any ideas why? > > > BTW, I can get around (2) by giving the title a fixed width of 48. > > TIA > Bernie I think I've had success with that issue setting the button to some value (item 1 or something) directly after creation, but before making the item visible? rc > > > '---------- > '~'A > ' Runtime : Rntm Appearance.Incl > ' CPU : Carbon > ' CALL Req'd : Off > '~'B > _Window1Wnd = 1 > _cGroupBox = 1 > > local fn BuildPopMenu(id as long) > dim as Handle popH > '~'< > menu id, 0, _enable, "" > menu id, 1, _enable, "1;2;3;4;5;6;7;8;9;10" > popH = fn GetMenuHandle(id) > DeleteMenu(id) > InsertMenu(popH,-1) > end fn > > local fn BuildWindow1Wnd > dim as ControlFontStyleRec cfs > dim as Rect r > '~'< > cfs.flags = _kControlUseFontMask > cfs.font = _kControlFontSmallSystemFont > > SetRect(r, 0, 0, 484, 296) > appearance window -_Window1Wnd, "Window 1", @r,¬ > _kDocumentWindowClass > > SetRect(r, 49, 61, 380, 183) > appearance button _cGroupBox, _activeBtn, 0, 101, -1,¬ > "Column:", @r, _kControlGroupBoxPopupButtonProc > def SetButtonFontStyle(_cGroupBox, cfs) > > appearance window _Window1Wnd > end fn > > fn BuildPopMenu(101) > fn BuildWindow1Wnd > > do > HandleEvents > until gFBQuit > '---------- > > -- >