| Height of droplist adjustable [message #406606] |
Fri, 26 January 2007 08:11  |
Ronald Messages: 68 Registered: July 2009 |
Member |
|
|
Hi all,
Just a minor thing, which would life make a little easier though.
Is it possible to increase / set the number of items visible in a drop list
of the properties view?
Now, only 4 or 5 items are visible at the same time, but I'd like to
increase that to 10 or more.
Is there a reason for displaying only a few items at once?
I suppose somewhere a drop list JFace (?) thing is created somewhere, where
the height is set, but I can't find it.
And is it changeable by either setting a property somewhere or by inheriting
a certain class?
btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one of
these days.
TIA
Ronald
|
|
|
| Re: Height of droplist adjustable [message #406607 is a reply to message #406606] |
Fri, 26 January 2007 10:21  |
Ed Merks Messages: 25226 Registered: July 2009 |
Senior Member |
|
|
This is a multi-part message in MIME format.
--------------030203020305010207060105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Ronald,
I think you'd need to create a specialized version of PropertyDescriptor
(as for when you want a customized cell editor) and use it to create a
specialized version of ExtendedComboBoxCellEditor that uses this method
of CCombo to set the number of visible items:
/**
* Sets the number of items that are visible in the drop
* down portion of the receiver's list.
*
* @param count the new number of items to be visible
*
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the
thread that created the receiver</li>
* </ul>
*
* @since 3.0
*/
public void setVisibleItemCount (int count) {
checkWidget ();
if (count < 0) return;
visibleItemCount = count;
}
I think you'd need to override createControl to have access to the
CCombo control because comboBox is a package protected field; getControl
should return it after createControl creates it and sets it, but you
need to cast in either case. Perhaps we can make this easier to control
somehow...
Ronald wrote:
> Hi all,
>
> Just a minor thing, which would life make a little easier though.
> Is it possible to increase / set the number of items visible in a drop list
> of the properties view?
> Now, only 4 or 5 items are visible at the same time, but I'd like to
> increase that to 10 or more.
>
> Is there a reason for displaying only a few items at once?
>
> I suppose somewhere a drop list JFace (?) thing is created somewhere, where
> the height is set, but I can't find it.
> And is it changeable by either setting a property somewhere or by inheriting
> a certain class?
>
> btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one of
> these days.
>
> TIA
> Ronald
>
>
>
--------------030203020305010207060105
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ronald,<br>
<br>
I think you'd need to create a specialized version of
PropertyDescriptor (as for when you want a customized cell editor) and
use it to create a specialized version of ExtendedComboBoxCellEditor
that uses this method of CCombo to set the number of visible items:<br>
<blockquote><small>/**</small><br>
<small> * Sets the number of items that are visible in the drop</small><br>
<small> * down portion of the receiver's list.</small><br>
<small> *</small><br>
<small> * @param count the new number of items to be visible</small><br>
<small> *</small><br>
<small> * @exception SWTException <ul></small><br>
<small> * <li>ERROR_WIDGET_DISPOSED - if the receiver has
been disposed</li></small><br>
<small> * <li>ERROR_THREAD_INVALID_ACCESS - if not called
from the thread that created the receiver</li></small><br>
<small> * </ul></small><br>
<small> * </small><br>
<small> * @since 3.0</small><br>
<small> */</small><br>
<small>public void setVisibleItemCount (int count) {</small><br>
<small> checkWidget ();</small><br>
<small> if (count < 0) return;</small><br>
<small> visibleItemCount = count;</small><br>
<small>}</small><br>
</blockquote>
I think you'd need to override createControl to have access to the
CCombo control because comboBox is a package protected field;
getControl should return it after createControl creates it and sets it,
but you need to cast in either case. Perhaps we can make this easier
to control somehow...<br>
<br>
<br>
Ronald wrote:
<blockquote cite="midepcumf$39m$1@utils.eclipse.org" type="cite">
<pre wrap="">Hi all,
Just a minor thing, which would life make a little easier though.
Is it possible to increase / set the number of items visible in a drop list
of the properties view?
Now, only 4 or 5 items are visible at the same time, but I'd like to
increase that to 10 or more.
Is there a reason for displaying only a few items at once?
I suppose somewhere a drop list JFace (?) thing is created somewhere, where
the height is set, but I can't find it.
And is it changeable by either setting a property somewhere or by inheriting
a certain class?
btw, I'm still using emf 2.2.0 v200605231736. I guess I should update one of
these days.
TIA
Ronald
</pre>
</blockquote>
<br>
</body>
</html>
--------------030203020305010207060105--
|
|
|
Powered by
FUDForum. Page generated in 0.01466 seconds