Kath Pelletti
kp at sdsonline.net
Tue Apr 25 19:22:39 CDT 2006
Hi Charlotte - thanks for asking. Yes - I did get a solution. Here it is: - Add a new tab control (leave it called TabControl1) - Change the tab control's properties as follows: - Change DrawMode to OwnerDrawFixed - Change Item Size to allow for a wider tab, eg. I changed it to 50,100 - Change Size mode to Fixed. Then add this code to get the text turned around to horizontal: -------------------------------------------------------------------------------- Private Sub TabControl1_DrawItem(ByVal sender As System.Object, _ ByVal e As DrawItemEventArgs) Handles TabControl1.DrawItem e.Graphics.FillRectangle(SystemBrushes.Control, e.Bounds) Dim sf As New StringFormat sf.Alignment = StringAlignment.Center sf.LineAlignment = StringAlignment.Center e.Graphics.DrawString(TabControl1.TabPages(e.Index ).Text, _ TabControl1.Font, SystemBrushes.ControlText, _ RectangleF.op_Implicit(e.Bounds), sf) End Sub -------------------------------------------------------------------------------- Works well. Credit to this site: http://www.pcreview.co.uk/forums/thread-1323844.php rgds Kath ----- Original Message ----- From: Charlotte Foust To: Access Developers discussion and problem solving Sent: Tuesday, April 25, 2006 1:51 AM Subject: Re: [AccessD] Tab Control - vb.net Did you ever get an answer to this? I was on vacation for 7 working days, so I'm out of date. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kath Pelletti Sent: Wednesday, April 12, 2006 5:19 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Tab Control - vb.net Tabs on the left with horizontal text Kath ----- Original Message ----- From: "Charlotte Foust" <cfoust at infostatsystems.com> To: "Access Developers discussion and problem solving" <accessd at databaseadvisors.com> Sent: Thursday, April 13, 2006 10:15 AM Subject: Re: [AccessD] Tab Control - vb.net > Text on labels is normally horizontal. Do you have the tabs on the > side, or did you mean vertical text? > > > Charlotte Foust > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kath Pelletti > Sent: Wednesday, April 12, 2006 5:04 PM > To: AccessD VB List; Access D Normal List > Subject: [AccessD] Tab Control - vb.net > > (Cross posted to accessd normal and vb.net lists) > > I am trying to create a form in vb.net with a tab control, where the > text on the labels is shown horizontally. If you look at [View], > [Property Pages] in vb.net to see the properties of the vb.net app then > they display a tab control exactly like what I need...... > > Does anyone know which properties I set to get the text to go that way? > I can't find it.... > > ______________________________________ > Kath Pelletti > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com