From: <mie...@us...> - 2013-02-07 00:45:07
|
Revision: 8950 http://sourceforge.net/p/oorexx/code-0/8950 Author: miesfeld Date: 2013-02-07 00:45:01 +0000 (Thu, 07 Feb 2013) Log Message: ----------- Feature Requests: #530 Want to be be able to calculate the rectangle occupied by a combo box item See ticket [Feature-requests:#530] #531 Combo box methods to set the minimum number of items shown in list See ticket [Feature-requests:#531] #532 Set the cue banner text for a combo box See ticket [Feature-requests:#532] Modified Paths: -------------- docs/trunk/oodialog/en-US/combobox.xml docs/trunk/oodialog/en-US/utilityclasses.xml Modified: docs/trunk/oodialog/en-US/combobox.xml =================================================================== --- docs/trunk/oodialog/en-US/combobox.xml 2013-02-07 00:11:05 UTC (rev 8949) +++ docs/trunk/oodialog/en-US/combobox.xml 2013-02-07 00:45:01 UTC (rev 8950) @@ -164,14 +164,26 @@ <entry>Returns a <computeroutput>Directory</computeroutput> object containinng information about this combo box.</entry> </row> <row> +<entry><xref linkend="mthGetEditControl"/></entry> +<entry>Returns a Rexx <computeroutput>Edit</computeroutput> object that represents the child edit control used by this combo box.</entry> +</row> +<row> +<entry><xref linkend="mthFirstVisibleClsComboBox"/></entry> +<entry> Determines the one-based index of the top item in the drop down list.</entry> +</row> +<row> <entry><xref linkend="mthGetHorizontalExtentClsComboBox"/></entry> <entry>Gets the value of the horizontal extent for the combo box.</entry> </row> <row> -<entry><xref linkend="mthGetEditControl"/></entry> -<entry>Returns a Rexx <computeroutput>Edit</computeroutput> object that represents the child edit control used by this combo box.</entry> +<entry><xref linkend="mthGetItemHeightClsComboBox"/></entry> +<entry>Determines the height of the list items or the height of the selection field in this combo box.</entry> </row> <row> +<entry><xref linkend="mthGetMinVisible"/></entry> +<entry>Determines the height of the list items or the height of the selection field in this combo box.</entry> +</row> +<row> <entry><xref linkend="mthGetTextClsComboBox"/></entry> <entry>Gets the text of the list item at the specified position in this combo box.</entry> </row> @@ -180,6 +192,14 @@ <entry>Inserts a new item into the list of the combo box after the specified item.</entry> </row> <row> +<entry><xref linkend="mthIsDropDown"/></entry> +<entry></entry> +</row> +<row> +<entry><xref linkend="mthIsDropDownList"/></entry> +<entry></entry> +</row> +<row> <entry><xref linkend="mthIsDropDownOpen"/></entry> <entry>Determines if the list of this combo box is dropped down.</entry> </row> @@ -188,6 +208,10 @@ <entry>Notifies the ooDialog framework that this combo box control is a grandchild of the dialog and configures the underlying combo box control to send four event notifications to the dialog, rather than its direct parent.</entry> </row> <row> +<entry><xref linkend="mthIsSimple"/></entry> +<entry></entry> +</row> +<row> <entry><xref linkend="mthItemsClsComboBox"/></entry> <entry>Retrieves the number of items in the combo box.</entry> </row> @@ -207,6 +231,7 @@ <entry><xref linkend="mthSelectedClsComboBox"/></entry> <entry>Retrieves the text of the currently selected item in the combo box list.</entry> </row> +</row> <row> <entry><xref linkend="mthSelectedIndexClsComboBox"/></entry> <entry>Retrieves the index of the currently selected item in the combo box list.</entry> @@ -216,13 +241,25 @@ <entry>Selects the list item at the specified index.</entry> </row> <row> +<entry><xref linkend="mthSetCueClsComboBox"/></entry> +<entry>Sets the cue banner text for this combo box.</entry> +</row> +<row> <entry><xref linkend="mthSetEditSelection"/></entry> <entry>Selects the specified text range in the edit control of the combo box.</entry> </row> <row> -<entry><xref linkend="mthGetHorizontalExtentClsComboBox"/></entry> -<entry>Sets the value of the horizontal extent for the combo box.</entry> +<entry><xref linkend="mthSetHorizontalExtentClsComboBox"/></entry> +<entry>Sets the width, in pixels, that the combo box's list box can be scrolled horizontally.</entry> </row> +<row> +<entry><xref linkend="mthSetItemHeightClsComboBox"/></entry> +<entry></entry> +</row> +<row> +<entry><xref linkend="mthSetMinVisible"/></entry> +<entry>Sets the minimum number of visible items in the drop down list of a combo box.</entry> +</row> </tbody></tgroup> </table> </section> @@ -977,39 +1014,31 @@ <indexterm><primary>ComboBox class</primary><secondary>getFirstVisible</secondary></indexterm> <programlisting> <![CDATA[ ->>--getFirstVisible(--+--------+--)--------------------------------------------->< - +--type--+ +>>--getFirstVisible------------------------------>< ]]> </programlisting> <para> - xx + Determines the one-based index of the top item in the drop down list. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para> - The arguments are: + There are no arguments for this method. </para> - <variablelist> - <varlistentry><term>TERM</term> - <listitem> - <para> - xx - </para> - </listitem></varlistentry> - </variablelist> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - xx + The one-based index of the item at the top of the list on success. O is returned on error. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> <listitem> <para> - Additional comments. + Initially the item with index 1 is at the top of the list. However, if the user has scrolled the list, the top index may + no longer number 1. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> @@ -1024,10 +1053,15 @@ <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example calculates the top y coordinate of the item under the mouse by subtracting the top index from the index of + the item under the mouse and multiplying that by the individual height: <programlisting> <![CDATA[ + topIndex = comboBox~getFirstVisible + r = lbRect~copy + r~top = (currentItem - topIndex) * itemHeight + ]]> </programlisting> </para> @@ -1087,25 +1121,26 @@ <indexterm><primary>ComboBox class</primary><secondary>getItemHeight</secondary></indexterm> <programlisting> <![CDATA[ ->>--getItemHeight(--+--------+--)--------------------------------------------->< - +--type--+ +>>--getItemHeight(--+--------------------+--)---->< + +--getSelectionField-+ ]]> </programlisting> <para> - xx + Determines the height of the list items or the height of the selection field in this combo box. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para> - The arguments are: + The single arguments is: </para> <variablelist> - <varlistentry><term>TERM</term> + <varlistentry><term>getSelectionField [optional]</term> <listitem> <para> - xx + If true get the selection field height, if false get the list items height. The + default is false, get the item height. </para> </listitem></varlistentry> </variablelist> @@ -1113,31 +1148,25 @@ <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - xx + Returns the height, in pixels, of the specified component. On error returns -1. </para> </listitem></varlistentry> - <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> - <listitem> - <para> - Additional comments. - </para> - </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> Raises syntax errors when incorrect usage is detected. </para> - <para> - Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. - </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example gets the height of the combo box items and increases it by 2 pixels: <programlisting> <![CDATA[ + itemHeight = comboBox~getItemHeight + itemHeight += 2 + comboBox~setItemHeight(itemHeight) ]]> </programlisting> </para> @@ -1150,57 +1179,60 @@ <indexterm><primary>ComboBox class</primary><secondary>getMinVisible</secondary></indexterm> <programlisting> <![CDATA[ ->>--getMinVisible(--+--------+--)--------------------------------------------->< - +--type--+ +>>--getMinVisible-------------------------------->< ]]> </programlisting> <para> - xx + Retrieves the minimum number of visible items that must be displayed in the drop down list of this combo box. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para> - The arguments are: + There are no arguments for this method. </para> - <variablelist> - <varlistentry><term>TERM</term> - <listitem> - <para> - xx - </para> - </listitem></varlistentry> - </variablelist> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - xx + Returns the minimum number of visible items. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> <listitem> <para> - Additional comments. + When the number of items in the drop down list is greater than the minimum, the combo box uses a scrollbar. Unless the + combo box has the no integral height style, the drop down will be sized so that it can accommodate the minimum number of + items. By default, 30 is the minimum setting for the combo box. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> - Raises syntax errors when incorrect usage is detected. + Requires Common Control <xref linkend="ovvComctl32"/> version 6.0 or later. </para> <para> - Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + Raises syntax errors when incorrect usage is detected. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example queries the current minimum visible setting, and then changes it to 10: <programlisting> <![CDATA[ + say 'Current minimum visible setting:' comboBox~getMinVisible + comboBox~setMinVisible(10) + say 'New minimum visible setting is: ' comboBox~getMinVisible + +/* Output would be: + +Current minimum visible setting: 30 +New minimum visible setting is: 10 + +*/ ]]> </programlisting> </para> @@ -1972,25 +2004,24 @@ <indexterm><primary>ComboBox class</primary><secondary>setCue</secondary></indexterm> <programlisting> <![CDATA[ ->>--setCue(--+--------+--)--------------------------------------------->< - +--type--+ +>>--setCue(--banner--)--------------------------->< ]]> </programlisting> <para> - xx + Sets the cue banner text for this combo box. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para> - The arguments are: + The single argument is: </para> <variablelist> - <varlistentry><term>TERM</term> + <varlistentry><term>banner [required]</term> <listitem> <para> - xx + The text for the banner. The text can not be longer than 255 characters in length. </para> </listitem></varlistentry> </variablelist> @@ -1998,31 +2029,43 @@ <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - xx + Returns 0 on success or 1 on error. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> <listitem> <para> - Additional comments. + The cue banner is text that is displayed in the edit control, or selection field, of a combo box when there is no item + currently selected. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> - Raises syntax errors when incorrect usage is detected. + <emphasis role="bold">Requires Windows Vista or later</emphasis>. </para> <para> - Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + Raises syntax errors when incorrect usage is detected. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example sets a simple cue for a combo box and then reads it back: <programlisting> <![CDATA[ + comboBox = self~newComboBox(IDC_COMBOBOX) + + comboBox~setCue("Select a city") + + say 'Cue set:' comboBox~getCue + +/* Output would be: + + Cue set: Select a city + +*/ ]]> </programlisting> </para> @@ -2264,10 +2307,13 @@ <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example gets the height of the combo box items and increases it by 2 pixels: <programlisting> <![CDATA[ + itemHeight = comboBox~getItemHeight + itemHeight += 2 + comboBox~setItemHeight(itemHeight) ]]> </programlisting> </para> @@ -2280,25 +2326,24 @@ <indexterm><primary>ComboBox class</primary><secondary>setMinVisible</secondary></indexterm> <programlisting> <![CDATA[ ->>--setMinVisible(--+--------+--)--------------------------------------------->< - +--type--+ +>>--setMinVisible(--number--)-------------------->< ]]> </programlisting> <para> - xx + Sets the minimum number of visible items in the drop down list of a combo box. </para> <variablelist> <varlistentry><term><emphasis role="bold">Arguments:</emphasis></term> <listitem> <para> - The arguments are: + The single argument is: </para> <variablelist> - <varlistentry><term>TERM</term> + <varlistentry><term>number [required]</term> <listitem> <para> - xx + The new setting for the minimum number of visible items in the drop down list. </para> </listitem></varlistentry> </variablelist> @@ -2306,31 +2351,43 @@ <varlistentry><term><emphasis role="bold">Return value:</emphasis></term> <listitem> <para> - xx + Returns true on success, fasle on error. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term> <listitem> <para> - Additional comments. + When the number of items in the drop down list is greater than the minimum, the combo box uses a scrollbar. Unless the + combo box has the no integral height style, the drop down will be sized so that it can accommodate the minimum number of + items. By default, 30 is the minimum setting for the combo box. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> <listitem> <para> - Raises syntax errors when incorrect usage is detected. + Requires Common Control <xref linkend="ovvComctl32"/> version 6.0 or later. </para> <para> - Sets the <link linkend="dotSystemErrorCode">.SystemErrorCode</link> variable. + Raises syntax errors when incorrect usage is detected. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Example:</emphasis></term> <listitem> <para> - This example ... + This example queries the current minimum visible setting, and then changes it to 10: <programlisting> <![CDATA[ + say 'Current minimum visible setting:' comboBox~getMinVisible + comboBox~setMinVisible(10) + say 'New minimum visible setting is: ' comboBox~getMinVisible + +/* Output would be: + +Current minimum visible setting: 30 +New minimum visible setting is: 10 + +*/ ]]> </programlisting> </para> Modified: docs/trunk/oodialog/en-US/utilityclasses.xml =================================================================== --- docs/trunk/oodialog/en-US/utilityclasses.xml 2013-02-07 00:11:05 UTC (rev 8949) +++ docs/trunk/oodialog/en-US/utilityclasses.xml 2013-02-07 00:45:01 UTC (rev 8950) @@ -1514,8 +1514,8 @@ 0 to 4294967295. </para> <para> - For convenience in looking up COM or OLE related error codes, a string in conventional <xref - linkend="defConventionalHex"/> format are also excepted. Typically an <computeroutput>OleObject</computeroutput> COM + For convenience in looking up COM or OLE related error codes, strings in conventional <xref + linkend="defConventionalHex"/> format are also accepted. Typically an <computeroutput>OleObject</computeroutput> COM related error is displayed something like: 0x80040000. </para> </listitem></varlistentry> @@ -1534,9 +1534,9 @@ Although any valid whole number within the range specified is accepted, only numbers that are actually valid system errors will produce a valid result. Numbers that are not Windows system errors will return a string similar to, <emphasis role="italic">Internal Windows error formatting the message (317)</emphasis>. The number in parenthesis will be the - system error code the Windows returned when asked for the message text for the <emphasis role="italic">errCode</emphasis> - argument. Since 317 is a valid system error, its message text could be looked up using the <emphasis - role="italic">errMsg</emphasis> method, see the example below. + system error code that Windows returned when asked for the message text for the <emphasis + role="italic">errCode</emphasis> argument. Since 317 is a valid system error, its message text could be looked up using + the <emphasis role="italic">errMsg</emphasis> method, see the example below. </para> </listitem></varlistentry> <varlistentry><term><emphasis role="bold">Details</emphasis></term> |