home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 20.ddi / DOC.PAK / BWCCSTYL.TXT < prev    next >
Encoding:
Text File  |  1993-12-02  |  8.1 KB  |  211 lines

  1.                            BWCCSTYL.TXT
  2.                            ============
  3. This guide presents style considerations you can follow when
  4. designing Borland Windows Custom Control (BWCC) dialog boxes for
  5. your Windows-based software.
  6.  
  7.  
  8. PANELS
  9. ======
  10. Each dialog box has two panels: a Main panel and an Action panel.
  11. The Main panel should contain all the required controls. The 
  12. Action panel should contain the push buttons.
  13.  
  14. Your finished dialog box should be relatively square. If the Main
  15. panel is wider than it is tall, put the Action panel along the
  16. bottom of your dialog box. If the Main panel is taller than it is
  17. wide, put the Action panel on the right side.
  18.  
  19. Main panel
  20. ----------
  21. You can arrange the group boxes on the Main panel in either a
  22. single column or row, or in an array. Here are some guidelines for
  23. arranging group boxes on the Main panel. You should treat group
  24. titles as part of the group boxes.
  25.  
  26. - Space group boxes 8 dialog units apart, both vertically and
  27.   horizontally.
  28.  
  29. - Leave a margin of 8 dialog units from all edges of the dialog
  30.   to the nearest group box.
  31.  
  32. - In a column of group boxes, make all group boxes the same
  33.   width. The width should accommodate the widest item or title.
  34.   Widen the other group boxes to match.
  35.  
  36. - In a row of group boxes, vary the group box heights.
  37.   Align the tops of the group boxes and let the bottoms of the
  38.   group boxes vary.
  39.  
  40. - If some of the group boxes in a row have titles and some don't,
  41.   align the top of the recessed group boxes with each other, not
  42.   with the title rectangles. For these "mixed" groups of boxes,
  43.   the margin above group boxes without titles should include the
  44.   space for a title.
  45.  
  46. - If some of the group boxes you want to align in a row are
  47.   taller than others, compute the bottom margin using the tallest
  48.   group box.
  49.  
  50. Action panel
  51. ------------
  52. An Action panel can appear at the bottom or the right side of a
  53. dialog box. Here are the guidelines for Action panels:
  54.  
  55. - Make the Action panel tall or wide enough to contain the push buttons
  56.   while leaving a margin of 8 dialog units above and below or to the 
  57.   sides of the push buttons.
  58.  
  59. - Distribute the push buttons evenly along the Action panel,
  60.   leaving a minimum of 8 dialog units between the buttons
  61.   and between the buttons and the edges of the dialog box.
  62.   Try to use the same number of dialog units between each button
  63.   and between the buttons and the edges of the dialog box. You can 
  64.   put more space between the buttons than between the buttons
  65.   and the edges of the dialog box, if necessary, but the
  66.   two margin spaces should be equal and the spaces between the
  67.   buttons should be equal.
  68.  
  69.  
  70. FONTS
  71. =====
  72. Borland dialog boxes use 8-point Helvetica Bold. The BWCC dialog
  73. controls look best when you use this font. An 8-point font is
  74. small; using it prevents your dialog boxes from growing too big. 
  75. Of course, you can use other fonts for other custom controls.
  76.  
  77.  
  78. GROUP BOXES
  79. ===========
  80. Collect all options that appear in the Main panel into BWCC group
  81. boxes. For example, place a group of related check boxes in a
  82. group box. You should place each single control, such as a file
  83. name text box or combo box, in a group box also. You won't have
  84. to do this with a Borland list box because a list box draws its
  85. own group box.
  86.  
  87. Group box titles
  88. ----------------
  89. A group box title identifies what a group box contains. By
  90. default, a group box title in a Borland dialog box has a gray
  91. background. Here are guidelines for using group box titles:
  92.  
  93. - If a group box contains multiple controls, place the group box
  94.   title above and touching the top edge of the group box.
  95.  
  96. - If a group box contains a single check box, place the group box
  97.   title above and touching the top edge of the group box.
  98.  
  99. - If a group box contains a single text box or combo box control,
  100.   you can either put the title to the left of the control and 4 units
  101.   from the edge of the group box or you can put it above the control.
  102.  
  103. - If a group box contains two or more editable text fields or
  104.   combo boxes or both, precede each with a short label.
  105.  
  106. - Align group box titles above the recessed group boxes.
  107.  
  108. - Make all group box titles 9 units high.
  109.  
  110. - Make the titles the same width as the group boxes, including
  111.   the beveled sides.
  112.  
  113. Group box elements
  114. ------------------
  115. These suggestions help you arrange elements within a group box:
  116.  
  117. - Distribute controls within a group box vertically every 13
  118.   units from the bottom of one line of text to the bottom of the
  119.   next.
  120.  
  121. - Left-justify the controls.
  122.  
  123. - The left and right margins between the edges of the group box
  124.   and the widest control within it should be 4 dialog-units wide.
  125.  
  126. - Make the margin between the top of the group box and the first
  127.   control in the group 4 dialog units.
  128.  
  129. - Make the margin between the bottom of the group box and the
  130.   last control in the group 4 dialog units.
  131.  
  132. - If a group box contains two or more editable text fields or
  133.   combo boxes or both, make them the same width. Space them so
  134.   that the bottom of one is 13 units from the bottom of the
  135.   next one. Right-justify these controls in the group box 4 units
  136.   from the right edge. Left-justify the titles, leaving a 4 unit
  137.   margin. Make the group box wide enough to leave 4 units between
  138.   the longest title and its control.
  139.  
  140.  
  141. PUSH BUTTONS
  142. ============
  143. The following are style considerations for push buttons:
  144.  
  145. - Borland's push buttons use glyphs (small bitmapped images). For
  146.   example, a question-mark glyph is used on the Help push button.
  147.   Place the glyph inside the button on the left side.
  148.  
  149. - Use Helvetica (normal, not bold) for the button's text and
  150.   right-justify it.
  151.  
  152. - Make each push button 39 pixels high for VGA resolution and 30
  153.   pixels high for EGA resolution.
  154.  
  155. - Most push buttons are 63 pixels wide in both VGA and EGA
  156.   resolution. Although you can make a button wider to prevent the
  157.   text and image from overlapping or looking too crowded, you
  158.   should try to restrict the width to 63 pixels if possible.
  159.  
  160. The Action panel push buttons usually indicate the end of a
  161. user's work with a dialog box, but can also serve as a major
  162. departure from the function of the dialog box, such as bringing up
  163. Help with the Help button. The guidelines for these buttons are:
  164.  
  165. - Put the buttons on the Main panel rather than the Action panel.
  166.  
  167. - Don't put these push buttons in a group box. Place them
  168.   directly on the surface of the Main panel.
  169.  
  170. - Make all push buttons in a group the same width. They should be
  171.   just wide enough to accommodate the widest text string.
  172.  
  173. - Make the buttons 14 dialog units in height.
  174.  
  175. - Try to restrict text to 20 characters or less.
  176.  
  177. - Place the buttons in either a row or a column, depending on
  178.   what looks best in your dialog box.
  179.  
  180. - Leave 8 dialog units to the left and right of a column of push
  181.   buttons. The vertical space between the buttons and any other
  182.   controls or borders above or below the buttons should be equal.
  183.  
  184. - Leave 8 dialog units above and below a row of push buttons. The
  185.   horizontal space between the buttons and any other controls or
  186.   borders to the left or right of them should be equal.
  187.  
  188.  
  189. EXAMINING YOUR DIALOG BOX
  190. =========================
  191. When Windows calculates dialog units, it rounds the computation.
  192. Rounding errors can affect the appearance of your dialog box. Examine
  193. your dialog box carefully and look for these problems:
  194.  
  195. - A crack between the title text and the top of a gray group box
  196.  
  197. - Obvious uneven spacing in a vertical group of radio buttons or
  198.   check boxes
  199.  
  200. - An inconsistent border width in exposed panel areas
  201.  
  202. Usually, making an adjustment of 1 dialog unit will fix these
  203. problems. Occasionally in a large group of repeating controls,
  204. two or more rounding errors can occur. You can't tell how text 
  205. in controls will appear when you are designing your dialog box. 
  206. Editable text, large static text fields, and combo boxes fall 
  207. into this category. You may have to modify your original design
  208. to be sure text appears correctly without being clipped at run time.
  209.  
  210.            ========= END OF FILE BWCCSTYL.TXT =========
  211.