Guidance
指路人
g.yi.org
Guidance Forums / Reginald Rexx / BUG _ Guigetctlplacement

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. 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.
view_header_question.rex
Message2.
#12731
Posted by: Jeff Glatt 2009-03-04 11:41:37
Offhand, it looks like your passing "Scale" as the seventh arg to GuiGetPlacement, rather than the eighth arg.
Message3. That's true, but if you change it
#12737
Posted by: Michael S 2009-03-05 01:40:33
as you suggest, it still produces strange results.
Message4.
#12986
Posted by: Doug Arndt 2009-06-02 22:20:34
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")
RETURN
Doug
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥880.00 ·
 
 
¥660.00 ·
 
 
¥1,580.00 ·
 
 
¥918.00 ·
 
 
¥430.00 ·
 
 
¥890.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0