martes, 26 de septiembre de 2017

cambiar font en TabControl

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TabControl1.DrawMode = TabDrawMode.OwnerDrawFixed
    End Sub

Properties TabControl, SizeMode: Fixed
Properties ItemSize

 Dim fnt As Font = New Font(TabControl1.Font.FontFamily, 10, FontStyle.Bold)
'Dim BoldFont As New Font(TabControl1.Font, FontStyle.Bold)
 e.Graphics.DrawString(TabControl1.TabPages(e.Index).Text, fnt, Brushes.Black, e.Bounds)

Fuente:
http://www.vbforums.com/showthread.php?355093-Setting-selected-tabpage-header-text-to-bold
http://www.vbforums.com/showthread.php?355093-Setting-selected-tabpage-header-text-to-bold
http://www.vbforums.com/showthread.php?683624-RESOLVED-Setting-the-font-to-the-title-of-a-tab-page
https://stackoverflow.com/questions/38942995/increase-width-and-height-of-headers-in-tabcontrol

Private Sub TabControl1_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles TabControl1.DrawItem
        Dim fnt As Font = New Font(TabControl1.Font.FontFamily, 11, FontStyle.Bold)
        e.Graphics.DrawString(TabControl1.TabPages(e.Index).Text, fnt, Brushes.Black, e.Bounds)
    End Sub

https://docs.microsoft.com/en-us/dotnet/framework/winforms/controls/how-to-display-side-aligned-tabs-with-tabcontrol

No hay comentarios.:

Publicar un comentario