BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TListBox type speed for selection of items

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Jochanan
Guest





PostPosted: Mon May 30, 2005 6:21 am    Post subject: TListBox type speed for selection of items Reply with quote



Hi,

Is there a way to cotrol the type speed while looking up items in the
TListBox.

the listbox is looking for the next word wile im stil typing my privius one.


Regards

jvdn.



Back to top
JD
Guest





PostPosted: Tue May 31, 2005 6:40 am    Post subject: Re: TListBox type speed for selection of items Reply with quote




"Jochanan" <non (AT) nomail (DOT) com> wrote:
Quote:

[...] the listbox is looking for the next word wile im stil
typing my privius one.

The only thing that you can do is intercept the key strokes
before they make their way to the TTreeView. The first chance
that you have to see a keypress is in the TApplication::OnMessage
event. From here, you can monitor all Window messages sent to
your application and change them as needed.

//--- in the header -------------------------------------------
private: // User declarations
void __fastcall MyAppMessage( TMsg&, bool& );
public: // User declarations
__fastcall ~TForm1();


//--- in the unit ---------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner)
{
Application->OnMessage = MyAppMessage;
}
//-------------------------------------------------------------
__fastcall TForm1::~TForm1()
{
Application->OnMessage = NULL;
}
//-------------------------------------------------------------
void __fastcall TForm1::MyAppMessage( TMsg &Msg, bool &Handled )
{
if( Msg.message == WM_KEYDOWN || Msg.message == WM_KEYUP )
{
if( Screen->ActiveControl == SomeForm->TreeView1 )
{
if( Msg.message == WM_KEYDOWN )
{
// buffer the keystroke found in Msg.wParam
}
Msg.wParam = NULL;
}
}
}
//-------------------------------------------------------------

Your problem now becomes how to know when to do a lookup. Look
at starting and resetting a TTimer when the WM_KEYDOWN is
detected for the control.

~ JD


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.