digitalmars.D.dwt - why cannot i change the Text control's font ?
- z_axis (17/17) Nov 09 2007 setfont.handleEvent(codeText, DWT.Selection, delegate(Event e){
setfont.handleEvent(codeText, DWT.Selection, delegate(Event e){ Text txt = cast(Text)e.cData; Font oldFont = txt.getFont(); FontDialog fontDialog = new FontDialog (shell); if(oldFont !is null) fontDialog.setFontList(oldFont.getFontData()); FontData fontData = fontDialog.open (); if (fontData !is null) { Font newFont = new Font(display, fontData) ; txt.font = newFont; txt.setFont( newFont ); if(oldFont !is null) oldFont.dispose(); } }); the code runs smoothly however the text control's font doesnot change ! -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Nov 09 2007