On Thursday 11 June 2009, Nataraj S Narayan wrote:> Hi
>
>
> How do i clear the FXTextFields of a FXVerticalFrame in one go?
> What is the structure that holds the components defined for the
FXVerticalFrame?
You can find the first child of a FXComposite by calling
child=composite->getFirst()
and subsequent siblings with:
child=child->getNext()
until child==NULL.
Of course, no guarantee that they''re FXTextFields. I recommend:
textfield=dynamic_cast<FXTextField*>(child);
if(textfield){
...
}
or:
if(child->isMemberOf(&FXTextField::metaClass)){
textfield=(FXTextField*)child;
...
}
If you KNOW they''re FXTextFields, you can of course omit the check and
simply use static_cast<FXTextField*>(child) instead, which is definitely
faster.
- Jeroen