[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KAStatusBar
From:       Sven Radej <sven () lisa ! exp ! univie ! ac ! at>
Date:       2000-03-15 17:13:28
[Download RAW message or body]

On Wed, 15 Mar 2000, Espen Sand wrote:
(...)
>Perhaps nitpicking but I think a "void freezeItem(int id)" would be useful as
>well. Quite often one define a "max" string in insertItem(..) so the width could
>be automatically computed using the string already present. I think new 
>programmers would prefer that over something like:
>
>statusBar()->insertItem( string, id ....)
>statusBar()->setItemFixed( id,
>  statusBar()->fontMetrics().boundingRect(string).width() );

Right. How about
 void setItemFixed(int id, ind width=-1);

when width=-1, width will be fixed according to text, so all you have to do is

  sb->insertItem(string, id);
  sb->setItemFixed(id);

Plus 

  void insertFixedItem(string, int id);
 
which does what theese two lines do. IŽll do that tommorow. 
-- 
Sven Radej      radej@kde.org
KDE developer   Visit http://www.kde.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic