|
Tutorial Example
Introduction
1. Specify ButtonStackBuilderSimply place
<panel> <buttonstackbuilder> </buttonstackbuilder> </panel> 2. Add ButtonsThere are only two kinds of buttons. Place buttons inside
<form-add gridded="true"> <button text="Help"/> </form-add> 2. Deal with GapsThere are two types of gaps. Related or Unrelated. Unrelated gaps are wider than related. There are two ways of specifying the gaps between buttons. 1. Add buttons as a group, and set the related flag in <form-add gridded="true" related="true"> <button text="Okay"/> <button text="Cancel"/> <button text="Apply"/> </form-add> 2. Manually insert the gap using <form-gap related="false"/> 3. Struts and GluesA strut is a fixed width gap between components. Use
<form-strut size="DLUY9"/> Glue is used to consume extra spaces when the panel grows beyond the preferred
size. Use <form-glue/> Glue can be used to force the alignment of the buttons, such as top, bottom, and center alignments. Top aligned button: <panel> <buttonstackbuilder> <form-add gridded="true"> <button text="Help"/> </form-add> <form-glue/> </buttonstackbuilder> </panel> Center aligned button: <panel> <buttonstackbuilder> <form-glue/> <form-add gridded="true"> <button text="Help"/> </form-add> <form-glue/> </buttonstackbuilder> </panel> |