 | | Wide Studio Object Reference
| |
Class Name
WSCoption
Specification of methods
setSelectValue method
- Form
- long setSelectValue(long value,WSCbool flag)
- Function
- Sets the sensibility of the elemnt of the menu
by the specified value.
- Description
- Seeks the element which has the specified value,
and makes it sensitive if the flag is True,
or makes it not,if False.
- Parameters
-
(in)long value | the value of the elment. |
(in)WSCbool fl | the sensibility |
- Return value
- Returns WS_NO_ERR if it succeeds; returns WS_ERR if it fails.
- Notice
-
- Samples
-
//make the value 100 not sensitive if the option menu has value 100...
newopti_000->setSelectValue(100,False);
setItemSensitive method
- Form
- long setItemSensitive(long no,WSCbool flag)
- Function
- Sets the sensibility of the element of the menu by
the specified position.
- Description
- Makes it sensitive if the flag is True,
or makes it not,if False.
- Parameters
-
(in)long no | the position (top:0,1,2,...) |
(in)WSCbool fl | the sensibility |
- Return value
- Returns WS_NO_ERR if it succeeds; returns WS_ERR if it fails.
- Notice
-
- Samples
-
//make the first menu item not sensitive..
newopti_000->setItemSensitive(0,False);
getValue method
- Form
- long getValue()
- Function
- Returns the value of the selected element.
- Description
-
- Parameters
- Nothing.
- Return value
- Returns the value of the selected element.
- Notice
-
- Samples
-
//get the selected menu value..
long val = newopti_000->getValue();
getItems method
- Form
- long getItems()
- Function
- Returns the number of the available menus.
- Description
-
- Parameters
- Nothing.
- Return value
- Returns the number of the available menus.
- Notice
-
- Samples
-
//get the array of the sensitve stats of menu.
WSCbool* statuslist = newopti_000->getSelectStatus();
long num = newopti_000->getItems();
long i;
for(i=0; i<num; i++){
WSCbool status = statuslist[i];
printf("menu%d status=%d\n",i,status);
}
getSelectStatus method
- Form
- WSCbool* getSelectStatus()
- Function
- Returns the array of the states
whether the elements are sensitive.
(True: sensitive,False: insensitive).
- Description
-
- Parameters
- Nothing.
- Return value
- Returns the array of the states
whether the elements are sensitive.
- Notice
-
- Samples
- Refer to getItems().
onActivate method
- Form
- void onActivate()
- Function
- It executes this method
when a menu item is selected.
- Description
- Instead of the event procedure
by the WSEV_ACTIVATE trigger,
the WSEV_ACTIVATE event can be handled
by overloading of this method.
- Parameters
- Nothing.
- Return value
- Nothing.
- Notice
- If needed, overload this method on the sub classes.
- Samples
-
void new_class::onActivate(){
//do something when the value is selected.
//call the method of the parent class.
old_class::onActivate();
}
onValueChange method
- Form
- void onValueChanged()
- Function
- It executes this method
when the selected value is changed.
- Description
- Instead of the event procedure
by the WSEV_VALUE_CH trigger,
the WSEV_VALUE_CH event can be handled
by overloading of this method.
- Parameters
- Nothing.
- Return value
- Nothing.
- Notice
- If needed, overload this method on the sub classes.
- Samples
-
void new_class::onValueChange(){
//do something when the value is changed.
//call the method of the parent class.
old_class::onValueChange();
}
Document Release 3.20 For Use with Wide Studio Release 3.20, Spring 2003 Wide Stuido Home | Up to Copyright(C) T. Hirabayashi, 1999-2003 | | Last modified: February 3, 2003 | |