[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KComboBox: adding a separator?
From: Michael Schuerig <schuerig () acm ! org>
Date: 2002-10-27 12:53:01
[Download RAW message or body]
On Saturday 26 October 2002 23:06, Carsten Pfeiffer wrote:
> On Saturday 26 October 2002 22:48, Michael Schuerig wrote:
> > I'd like to insert a separator into a KComboBox. The purpose is, to
> > separate several recently chosen items at the top from the full
> > alphabetical listing further down. I'm a newbie, thus I may well be
> > missing more than a thing, but I don't see how to do this.
>
> Are you talking about a read-only or editable combobox? In the latter
> case, you should probably use a separator-like text, i.e.
> "----------------------".
>
> Otherwise, you can use the listBox() method to access the internally
> used QListBox and insert anything into it, i.e. QListBoxItems with a
> pixmap or a custom paint-method.
It's in-between read-only and editable. The initial list only contains
phone numbers taken from the addressbook. On top of that I want to put
a list of recently used numbers, set off by a separator. A recently
used number can either be one chosen from the list by the user or one
entered explicitly. Recent numbers should not be handled by the
ComboBox, I'll do that myself. Thus, the ComboBox has a NoInsertion
policy. Also, it should obviously not be possibly to select the
separator.
I'm surprised that I can't just call comboBox->insertSeparator(). Does
it conflict with any GUI style guide?
Michael
--
Michael Schuerig If at first you don't succeed...
mailto:schuerig@acm.org try, try again.
http://www.schuerig.de/michael/ --Jerome Morrow, "Gattaca"
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic