Jump to content

Invert tab item on bottom of tab control


fett8802
 Share

Recommended Posts

Hello all,

I feel bad, second new topic in two days. >.<

I've got a tab control with tab items. I've set the style of the tab control to display the tab items on the bottom of the tab control. Functionally, this works just fine. However, the tab item is display in such a way that it looks "cut off" and like it belongs on top of the control.

The below replication code will show you what I mean. Note: I am using the _GUICtrlTab functions, not the standard functions used in the code below. However, the demonstrated effect is identical.

#include <GUIConstantsEx.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
$Tab1 = GUICtrlCreateTab(56, 56, 289, 225, $TCS_BOTTOM)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func Form1Close()
Exit
EndFunc

Does anyone know if it's possible to invert the graphic of the tab item control to make it look like it belongs on bottom? For an example of what I mean, open an Excel file and note the tabs across the bottom. I've scoured the forums and the help file and can't find a way to do it. Any ideas would be very much appreciated!

Thanks,

Fett

[sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub]
Link to comment
Share on other sites

You mean like this:

post-66582-0-73661500-1320947281_thumb.p

PS: I changed ABSOLUTELY NOTHING in the script.

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

That's bizarre! Here's how mine looks:

post-58637-0-66576100-1320948390_thumb.p

-Fett

[sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub]
Link to comment
Share on other sites

fett, that's how it looks on my system as well, Windows 7 Professional.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Try changing the theme. EG. XP to Classic, Aero to Non-Aero

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Link to comment
Share on other sites

Add this line after the GUISetState() line:

DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Tab1), "wstr", 0, "wstr", 0)

This removes the Windows theme for the Tab1 control so it should display it correctly for you.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...