Click here to Skip to main content
15,889,852 members
Home / Discussions / C#
   

C#

 
QuestionIE-like combobox in PropertyGrid [modified] Pin
to_samGmbH10-Sep-07 0:04
to_samGmbH10-Sep-07 0:04 
AnswerRe: IE-like combobox in PropertyGrid Pin
visualhint10-Sep-07 6:24
visualhint10-Sep-07 6:24 
GeneralRe: IE-like combobox in PropertyGrid Pin
to_samGmbH10-Sep-07 21:34
to_samGmbH10-Sep-07 21:34 
GeneralRe: IE-like combobox in PropertyGrid Pin
visualhint11-Sep-07 2:02
visualhint11-Sep-07 2:02 
GeneralRe: IE-like combobox in PropertyGrid Pin
to_samGmbH11-Sep-07 3:03
to_samGmbH11-Sep-07 3:03 
GeneralRe: IE-like combobox in PropertyGrid Pin
visualhint11-Sep-07 3:19
visualhint11-Sep-07 3:19 
QuestionChanging a tabpage font Pin
Muammar©9-Sep-07 23:45
Muammar©9-Sep-07 23:45 
AnswerRe: Changing a tabpage font Pin
Martin#10-Sep-07 0:20
Martin#10-Sep-07 0:20 
Hello Muammar,

The Font of the Text you see in the Tab Selection is not a member of the TabPage itselve.
It is a member of the TabControl.

So if you set the Font property of the TabControl, all the TabPage writers will change.
If you whant to chenge only one (the active one), you better inherit you own TabControl and:

1)Set "this.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;" in the Constructor

2)override OnDrawItem:
protected override void OnDrawItem(DrawItemEventArgs e)


3)set a Font variable accordingly to EventArgs index:
Font actFont;

if(e.Index != this.SelectedIndex)
{
actFont = e.Font;
}
else
{
actFont = new Font("Tahoma", (float)8.25, FontStyle.Bold);
}


4)write the Text (using System.Drawing)
using(StringFormat sf = new StringFormat())
{
    sf.Alignment = StringAlignment.Center;
    e.Graphics.DrawString(this.TabPages[e.Index].Text, actFont, Brushes.Black, e.Bounds, sf);
}


Hope it helps!

All the best,

Martin

GeneralRe: Changing a tabpage font Pin
Muammar©10-Sep-07 1:03
Muammar©10-Sep-07 1:03 
GeneralRe: Changing a tabpage font Pin
Martin#10-Sep-07 1:06
Martin#10-Sep-07 1:06 
QuestionDagridView Pin
Assaf829-Sep-07 23:22
Assaf829-Sep-07 23:22 
QuestionLog on services as Local System account Pin
Developer6119-Sep-07 23:13
Developer6119-Sep-07 23:13 
QuestionSelecting a tree node?? Pin
Muammar©9-Sep-07 22:58
Muammar©9-Sep-07 22:58 
AnswerRe: Selecting a tree node?? Pin
Pete O'Hanlon9-Sep-07 23:08
mvePete O'Hanlon9-Sep-07 23:08 
GeneralRe: Selecting a tree node?? Pin
Muammar©10-Sep-07 1:10
Muammar©10-Sep-07 1:10 
AnswerRe: Selecting a tree node?? Pin
Abisodun10-Sep-07 1:36
Abisodun10-Sep-07 1:36 
GeneralRe: Selecting a tree node?? Pin
Muammar©10-Sep-07 19:39
Muammar©10-Sep-07 19:39 
GeneralRe: Selecting a tree node?? Pin
Abisodun11-Sep-07 1:55
Abisodun11-Sep-07 1:55 
QuestionHow find class name and constructor in a cs file ? Pin
topcatalpha9-Sep-07 22:20
topcatalpha9-Sep-07 22:20 
AnswerRe: How find class name and constructor in a cs file ? Pin
Paul Conrad14-Sep-07 19:03
professionalPaul Conrad14-Sep-07 19:03 
GeneralRe: How find class name and constructor in a cs file ? Pin
topcatalpha16-Sep-07 20:51
topcatalpha16-Sep-07 20:51 
QuestionSession.clear ans session.abandon Pin
Sonia Gupta9-Sep-07 22:14
Sonia Gupta9-Sep-07 22:14 
AnswerRe: Session.clear ans session.abandon Pin
Pete O'Hanlon9-Sep-07 22:55
mvePete O'Hanlon9-Sep-07 22:55 
AnswerRe: Session.clear ans session.abandon Pin
Guffa9-Sep-07 23:10
Guffa9-Sep-07 23:10 
GeneralRe: Session.clear ans session.abandon Pin
Sonia Gupta9-Sep-07 23:17
Sonia Gupta9-Sep-07 23:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.