On Thu, 11 May 2000, Daniel Naber wrote: > On Don, 11 Mai 2000, Carsten Pfeiffer wrote: > > > why don't you simply use KCompletion? KLineEdit/KComboBox have built-in > > Does KLineEdit offer multiple alternatives if there's more than one match? Yes! Simply press the rotation key again and it will iterate through all the possible matches. Alternatively you can use the the mutiple matches rotation key ( which by default is Ctrl+Up & Ctrl+Down ) to do the same thing. > Are these alternatives visible at the same time (thy should)? No they are not. This is a missing feature for now. In the future I might add a list box to show multiple matches. For now whenever there are multiple matches you get a que ( sound ), and then if you press the completion key again it will rotate through all the possible matches. Alternatively, you can use the rotation keys for multiple matches, which by default are Ctrl+Up and Ctrl+Down keys, to do the same thing when you have multiple matches. > It's not so easy to use KComboBox, because we use cursor down to move > to the next field, and KComboBox uses cursor down to iterate through the list. KLineEdit does not, at least not by default, because it does not support history list rotation anymore. But this whole point is moot because these widgets are way more programmable than their {Q} counter-parts as they don't have the key-bindings for the features they support hard-coded!! Thus, it is very easy to change the keys in either widget so that you can accomodate any kind of special case you may have. That was one of the main features of these two widgets. You can change the key-bindings for the completion and text rotation and as well as the history list in KComboBox's case. This can be done through the control panel by the user using the Look&Feel->KeyBinding entry or programatically so that the user's changes in the control panel are ignored. Anyways, here is an example code for permanently disabling/changing the history list key-bindings in KComboBox so that you can use whatever binding you perfer: KComboBox *combo = new KComboBox( true, this ); edit->setKeyBinding( KCompletionBase::RotateUp, Qt::ShiftButton + Qt::Key_Up); edit->setKeyBinding( KCompletionBase::RotateDown, Qt::ShiftButton + Qt::Key_Down ); This will force the widgets to ignore the global setting for the key-bindigs in the KStdAccel and use the modified vaules. Now all you have to do in your program is to trap the events from this widget using combo->installEventFilter( this ); and do whatever you need when those keys are pressed. I am afraid it is not as simple and consistent to change this unless it is done at the toolkit level so that it is the same among all widgets ( read: the troll's have to implement their own means of providing configurable key-bindings for the different features they support ). Simply it is a toolkit issue. Regards, Dawit A.