GWEN improvement: allow to navigate TreeControl and ComboBox using the cursor keys

This commit is contained in:
erwin coumans
2013-07-01 23:43:49 -07:00
parent 898f423f95
commit 0f78c696b5
14 changed files with 458 additions and 17 deletions

View File

@@ -15,12 +15,17 @@ class TreeControl2 : public GUnit
{
Gwen::Controls::TreeControl* ctrl = new Gwen::Controls::TreeControl( this );
ctrl->SetKeyboardInputEnabled(true);
ctrl->AddNode( L"Node One" );
Gwen::Controls::TreeNode* pNode = ctrl->AddNode( L"Node Two" );
pNode->AddNode( L"Node Two Inside" );
pNode->AddNode( L"Eyes" );
pNode->SetSelected(true);
pNode->AddNode( L"Brown" )->AddNode( L"Node Two Inside" )->AddNode( L"Eyes" )->AddNode( L"Brown" );
ctrl->AddNode( L"Node Three" );
ctrl->Focus();
ctrl->SetKeyboardInputEnabled(true);
ctrl->SetBounds( 30, 30, 200, 200 );
ctrl->ExpandAll();