Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] how to set the TreeItem font to bold?

public void setBold (boolean bold) {
	checkWidget ();
	int hwnd = parent.handle;
	TVITEM tvItem = new TVITEM ();
	tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;
	tvItem.stateMask = 0x0010;
	tvItem.hItem = handle;
	if(bold)
	{
		tvItem.state = 0x0010;
	}
	else
	{
		tvItem.state = 0;
	}
	
	OS.SendMessage (hwnd, OS.TVM_SETITEM, 0, tvItem);
}

Add this code to TreeItem.java.
Now I can set font to Bold. :-)
Hopefully you'll support "changing the font of one item" in next release. 

Thanks.

Dayu

-----Original Message-----
From: Veronika Irvine [mailto:Veronika_Irvine@xxxxxxxxxx]
Sent: Wednesday, April 16, 2003 9:33 AM
To: platform-swt-dev@xxxxxxxxxxx
Subject: Re: [platform-swt-dev] how to set the TreeItem font to bold?


Changing the font of one item is not supported.  You can change the 
foreground and background color of an item.  See TreeItem.setForeground 
and TreeItem.setBackground.






"DAYU ZHANG" <DAYU.ZHANG@xxxxxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
04/15/2003 04:58 PM
Please respond to platform-swt-dev

 
        To:     <platform-swt-dev@xxxxxxxxxxx>
        cc: 
        Subject:        [platform-swt-dev] how to set the TreeItem font to bold?



Can I set the TreeItem's font to bold?
I can't find such method in API spec.

Thanks.

Dayu
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top