roro69 Posted January 21, 2016 Share Posted January 21, 2016 Hello , Is it possible in the Drop down list fontname of CodeLab .; can draw like the paint net dropdown list fontname I would like in the plugin that I have tried to make the Drop down list like this If it is not possible ; I will do my plugin in visual studio but I find it a bit complicated create plugin with Visual studio I started my visual studio code like this: private void MonEffetConfigDialog_Load(object sender, EventArgs e) { this.MaCombo1.DrawMode = DrawMode.OwnerDrawFixed; this.MaCombo1.ItemHeight = 18; this.MaCombo1.DrawItem += new DrawItemEventHandler(this.MaCombo2_DrawItem); InstalledFontCollection MesPolicesInstalle = new InstalledFontCollection(); FontFamily[] FontFamille = MesPolicesInstalle.Families; FontFamily[] MonTableau = FontFamille; for (int i = 0; i < MonTableau.Length; i++) { FontFamily FontFamille1 = MonTableau[i]; if (FontFamille1.IsStyleAvailable(FontStyle.Regular)) { this.Macombo1.Items.Add(FontFamille1.Name); } } } private void MaCombo2_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); ComboBox Macombo = (ComboBox)sender; string texte = (e.Index > -1) ? Macombo.Items[e.Index].ToString() : Macombo.Text; Font Police = new Font(texte, Macombo.Font.Size); Brush Pinceau = new SolidBrush(e.ForeColor); float fl = ((float)e.Bounds.Height - e.Graphics.MeasureString(texte, Police).Height) / 2f; e.Graphics.DrawString(text, font, brush, (float)e.Bounds.X, (float)e.Bounds.Y +fl); Police.Dispose(); Pinceau.Dispose(); e.DrawFocusRectangle(); } But I preferred to make my plugin with codelab. Thank you very much for your answers and assistance Quote Link to comment Share on other sites More sharing options...
BoltBait Posted January 21, 2016 Share Posted January 21, 2016 CodeLab generates plugins utilizing the built-in (to paint.net) UI features called IndirectUI. This type of control is not supported by paint.net therefore CodeLab can not generate such a control for you. Sorry. Quote Download: BoltBait's Plugin Pack | CodeLab | and a Free Computer Dominos Game Link to comment Share on other sites More sharing options...
roro69 Posted January 22, 2016 Author Share Posted January 22, 2016 Hello Thank you very much for your answers It's a shame because with fontname combo CodeLab; it is obliged to load the style one by one to see the result style font in the canvas. Too bad I will pass visual studio and event combo DrawItem Thank you for help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.