 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Paw Suddergaard Guest
|
Posted: Fri Jul 30, 2004 12:30 pm Post subject: TabOrder and TabStop in Multi component derived from TWinCon |
|
|
Hi!
I have a component with several other components in it. Button, Combobox
etc... the component is derived from TWinControl.
I only want TabStop and TabOrder on one of the components in the component
to get a "normal" component. So i have set all the others to Tabstop =
false; and the only component i want tabstop = true; i have set taborder =
0;
But i can't seem to get tabstop and taborder to work... I have these
properties:
private:
............
int FTabOrder;
bool FTabStop;
int __fastcall GetTabOrder(){return FTabOrder;}
void __fastcall SetTabOrder(int TabOrder){FTabOrder = TabOrder;}
bool __fastcall GetTabStop(){return FTabStop;}
void __fastcall SetTabStop(bool TabStop){FTabStop = TabStop;}
__published:
__property int TabOrder = {read = GetTabOrder, write =
SetTabOrder};
__property bool TabStop = {read = GetTabStop, write =
SetTabStop};
Any help would be great!
Thanks in advance,
Paw Suddergaard
|
|
| Back to top |
|
 |
Todd Brylski Guest
|
Posted: Sat Jul 31, 2004 3:48 am Post subject: Re: TabOrder and TabStop in Multi component derived from TWi |
|
|
"Paw Suddergaard" <paw (AT) easyflex (DOT) dk> wrote
| Quote: | But i can't seem to get tabstop and taborder to work...
|
Try something like this:
class PACKAGE TWinControlX : public TWinControl
{
private:
TButton* Button;
TComboBox* Combo;
TEdit* Edit;
bool __fastcall GetTabStop();
void __fastcall SetTabStop( bool Value );
protected:
public:
__fastcall TWinControlX(TComponent* Owner);
__published:
__property TabOrder ;
__property TabStop = { read=GetTabStop, write=SetTabStop } ;
};
__fastcall TWinControlX::TWinControlX(TComponent* Owner)
: TWinControl(Owner)
{
Width = 200;
Height = 150;
Button = new TButton(this);
Button->Parent = this;
Button->SetBounds( 16, 16, Button->Width, Button->Height );
Button->TabStop = false;
Combo = new TComboBox(this);
Combo->Parent = this;
Combo->SetBounds( 16, 48, Combo->Width, Combo->Height );
Combo->TabStop = false;
Edit = new TEdit(this);
Edit->Parent = this;
Edit->SetBounds( 16, 80, Edit->Width, Edit->Height );
Edit->TabStop = true; // <---
}
//---------------------------------------------------------------------------
bool __fastcall TWinControlX::GetTabStop()
{
return Edit->TabStop;
}
void __fastcall TWinControlX::SetTabStop( bool Value )
{
Edit->TabStop = Value;
}
Todd
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|