| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. BUG _ Guigetctlplacement #12725 Posted by: Michael S 2009-02-27 00:45:56 Last edited by: Michael S 2009-02-27 00:50:56 (Total edited 1 time) | I refer to the following append that Doug created and was never answered.
http://g.yi.org/?a=f&m=12391#12391
I'm seeing the same problem when trying to delete and create a view - the size is WAY too large. Try running the attached script, press the fill button and see the results of the view control that's created. | 2. #12731 | Offhand, it looks like your passing "Scale" as the seventh arg to GuiGetPlacement, rather than the eighth arg. | 3. That's true, but if you change it #12737 | as you suggest, it still produces strange results. | 4. #12986 | The doc for 'SCALE' says it's only for the control size, the problem is with the X & Y values.
SCALE "When returning the Width or Height, scale it in font units. This is useful if using the width and height in conjunction with adding a control to the window."
Here's a little demo program:
/* GUIBEGIN
WINDOW , 204, 117, 400, 255, POPUP|CAPTION|SYSMENU|MINBOX|MAXBOX|THICK, , Placement test FONT 8, 400, MS Shell Dlg TEXT 7, 148, 389, 103, GROUP, , ConBox, , Console box PUSH 322, 7, 40, 14, TABSTOP, , ExitButton, , Exit PUSH 5, 7, 86, 16, TABSTOP, , PushMe, , Push Me DEND GUIEND */
LIBRARY rexxgui, RxConsole
GuiErr = "SYNTAX" GuiHeading = 1 GuiCreateWindow('NORMAL') consay(con1,"'Push Me' as defined: 5, 7, 86, 16")
DO FOREVER GuiGetMsg() IF EXISTS('GuiObject') == 0 THEN DO IF EXISTS('GuiSignal') THEN DO If GuiSignal = 'CLOSE' then leave END END CATCH SYNTAX CONDITION()
CATCH HALT
FINALLY GuiDestroyWindow() END RETURN
/* Create console by converting 'ConBox' * ConSay(Con1,'text' <,'NOBREAK'>) */ wm_initdialog: guigetctlplacement('ConBox','ConX' ,'ConY' , 'ConWidth', 'ConHeight') GuiRemoveCtl('ConBox') concreate('Con1', guiwindow, "CHILD | NODEFAULT",ConX, ConY, ConWidth, ConHeight) consetlimit(Con1,500) RETURN ""
WM_CLICK_ExitButton: GuiWake('CLOSE') RETURN
WM_CLICK_PushMe: consay(con1,"") GuiGetCtlPlacement('PushMe', 'PMx', 'PMy', 'PMw', 'PMh') consay(con1,"Control location =" PMx PMy PMw PMh) GuiGetCtlPlacement('PushMe', 'PMx', 'PMy', 'PMw', 'PMh',,,'SCALE') consay(con1,"Control location (SCALE) =" PMx PMy PMw PMh)
GuiRemoveCtl('PushMe') GuiAddCtl("PUSH" PMx PMy PMw PMh "TABSTOP, , PushMe, , Push Me") RETURNDoug | Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|