예제 #1
0
 private void Initialize2()
 {
     this.format = new StringFormat();
     this.gr     = this.CreateGraphicsBuf();
     //this.gr=this.CreateGraphics();
     this.caret = mwg.Windows.Caret.CreateNew(this);
     this.sd    = new mwg.Drawing.StringDrawer(this);
     this.ime   = new IME(this);
     //
     // caret
     //
     //this.caret.Size=new Size(1,10);
     //
     // sd
     //
     this.sd.LetterSpacing     = 0;
     this.sd.Font              = new System.Drawing.Font("MS ゴシック", 9);
     this.sd.Rectangle         = new Rectangle(10, 10, 200, 200);
     this.sd.Return            = true;
     this.sd.Position          = new PointF(10, 10);
     this.sd.PositionChanged  += new mwg.Drawing.StringDrawer.PositionEvent(sd_PositionChanged);
     this.sd.FontChanged      += new mwg.Drawing.StringDrawer.FontEventHandler(sd_FontChanged);
     this.sd.DirectionChanged += new mwg.Drawing.StringDrawer.FontEventHandler(sd_DirectionChanged);
     //this.sd.Vertical=true;
     //this.sd.RTL=true;
     //
     // ime
     //
     this.ime.Char             += new mwg.Windows.IME.CompositionEventHandler(this.ime_Char);
     this.ime.StartComposition += new EventHandler(this.ime_StartComposition);
 }
예제 #2
0
 private void OnGotFocus(object sender, System.EventArgs e)
 {
     this.create();
     Caret.SetCaretPos(this.Position.X, this.Position.Y);
     this.Visible = true;
 }
예제 #3
0
 private void destroy()
 {
     Caret.DestroyCaret();
 }