|
|
Re: How to change List font? [message #117911 is a reply to message #117899] |
Thu, 08 January 2009 13:09 |
Michael Haendel Messages: 5 Registered: July 2009 |
Junior Member |
|
|
Thanks for the fast replay, Ivan.
Here's the snippet:
public class WidgetTest implements IEntryPoint {
public int createUI() {
Display display = new Display();
Shell shell = new Shell(display, SWT.NO_TRIM);
shell.setLayout(new FillLayout());
List li = new List(shell, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
for (int i = 0; i < 6; i++){
li.add("Element " + i);
}
li.setFont(Graphics.getFont("Helvetica", 20, SWT.BOLD));
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
return 0;
}
}
Setting the font this way works for all widgets (I tested Combo and Label)
, but not for the List. I'm using RAP 1.2M3 and deploy on Tomcat.
Regards,
Michael.
Ivan Furnadjiev wrote:
> Hi Michael,
> setting the font of List works as expected in the Controls Demo with
> both setFont() and via theming. Can you provide a snippet for
> reproducing the problem?
> Best,
> Ivan
> Michael Haendel wrote:
>> I tried to change the font of a List with the setFont() method, but
>> the font always stays the same. Do you have any ideas how to set a
>> specific font for the List elements?
>>
>> Thanks in advance,
>> Michael.
>>
|
|
|
Re: How to change List font? [message #117923 is a reply to message #117911] |
Thu, 08 January 2009 15:27 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Michael,
thank you for pointing this. It was a bug and I fixed it in CVS HEAD.
Best,
Ivan
Michael Haendel wrote:
> Thanks for the fast replay, Ivan.
>
> Here's the snippet:
>
> public class WidgetTest implements IEntryPoint {
> public int createUI() {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.NO_TRIM);
> shell.setLayout(new FillLayout());
> List li = new List(shell, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
> for (int i = 0; i < 6; i++){
> li.add("Element " + i);
> }
> li.setFont(Graphics.getFont("Helvetica", 20, SWT.BOLD));
> shell.open();
>
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) {
> display.sleep();
> }
> }
> return 0;
> }
> }
>
> Setting the font this way works for all widgets (I tested Combo and
> Label) , but not for the List. I'm using RAP 1.2M3 and deploy on Tomcat.
>
> Regards,
> Michael.
>
> Ivan Furnadjiev wrote:
>
>> Hi Michael,
>
>> setting the font of List works as expected in the Controls Demo with
>> both setFont() and via theming. Can you provide a snippet for
>> reproducing the problem?
>
>> Best,
>> Ivan
>
>> Michael Haendel wrote:
>>> I tried to change the font of a List with the setFont() method, but
>>> the font always stays the same. Do you have any ideas how to set a
>>> specific font for the List elements?
>>>
>>> Thanks in advance,
>>> Michael.
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03053 seconds