Topic
4 replies Latest Post - ‏2013-11-07T15:44:55Z by llandale
zhangw
zhangw
2 Posts
ACCEPTED ANSWER

Pinned topic Dialog Box Element Positioning

‏2013-11-06T20:38:52Z |

Hi Guys,

I'm just starting dxl, and I'm confused on positioning elements in the dialog Box.

The following code

theTab->"right"->"form" 


theFrame->"left"->"inside"->theTab 
->"top"->"spaced"->  Where can I get a list of all the keywords following -> for different type of element?

Is there a link or somewhere in the DXL manual that lists all the keyword?(By keywords I mean "Left", "inside", "spaced"..etc)

 

Thanks guys for support!

 

  • GregM_dxler
    GregM_dxler
    162 Posts
    ACCEPTED ANSWER

    Re: Dialog Box Element Positioning

    ‏2013-11-07T14:02:46Z  in response to zhangw

    In the dxl reference manual, look under Contrained placement.  This provides you with most of the list, spaced, flush, unattached, aligned and inside.  You might also look at the simple placement.

    Dialog box placement is tricky and it doesn't always do what you think it should do.  Takes practice.

    Hope this helps,

    Greg

    • llandale
      llandale
      2943 Posts
      ACCEPTED ANSWER

      Re: Dialog Box Element Positioning

      ‏2013-11-07T15:44:55Z  in response to GregM_dxler

      Yup, I've written 100s of dialogs and NEVER got one placed correctly the 1st time.  I have found that diligently thinking and coding from left-to-right and top-down helps considerably.  For big dialogs with frames and tabs, I just go ahead and have multiple functions to conceptualize it.  For example

      • CreateFrame_1()
      • {  put top-left DBE in frame
      •     posiution additional framed DBEs relative to 1st one
      • }
      • Main:
      • {  create dialog
      •     CreateFrame_1
      •     CreateFrame_2
      •     position Frame_2 below Frame_1
      • }

      Some high powered folks here may scoff at that since they can handle scores of variables in their heads at one time; but I cannot.

      Some tricky dialogs require hokey invisible DBEs to finalize the attachments.  There are time B relative to A won't work; B relative to invisible H relative to A does.

      -Louie

  • sekrbo
    sekrbo
    39 Posts
    ACCEPTED ANSWER

    Re: Dialog Box Element Positioning

    ‏2013-11-07T14:12:16Z  in response to zhangw

    From the manual:

     

    Attachment placement
    The -> operator is used in constrained placement, as shown in the following syntax:

    DBE elem -> string side -> string attachment [-> DBE other]
    where:

    elem- Is a dialog box element of type DBE. 
    side- Is the side the attachment is on: left, right, top or bottom (these are not case sensitive). 
    attachment- Is the type of attachment: flush, spaced, aligned, unattached, inside or form (these are not case sensitive). 
    other- Is the dialog box element of type DBE that is the one relative to which placement is to be performed. 


    The three operators together make a complete specification for the attachment.

  • zhangw
    zhangw
    2 Posts
    ACCEPTED ANSWER

    Re: Dialog Box Element Positioning

    ‏2013-11-07T14:34:16Z  in response to zhangw

    Thanks guys i found both( attachment&Constrained) very useful!