Sign in to follow this  
Followers 0
AustrianOak

how to get rid of or hide this tab color

9 posts in this topic

#1 ·  Posted (edited)

if you look at the attached picture there is a brownish tannish looking color on the right side of my two tabs. I have been trying to find a way to hide that color or make it completely transparent and get ride of it altogether with no success!

Please someone help me on how to get rid of that or change it to another color.

Edit: Attached picture

Edited by nowagain

Share this post


Link to post
Share on other sites



if you look at the attached picture there is a brownish tannish looking color on the right side of my two tabs. I have been trying to find a way to hide that color or make it completely transparent and get ride of it altogether with no success!

Please someone help me on how to get rid of that or change it to another color.

Edit: Attached picture

I think you can do that by turning off XP themes before you create the tab and tab items items then turn XP themes back on afterwards

Global $XS_n

$Gui = GuiCreate("Whatever....
;create something

XPStyleToggle(1);turn of XP themes
;create your tab here
XPStyleToggle(0)
GUISetState()



Func XPStyleToggle($OnOff = 1)
    If Not StringInStr(@OSTYPE, "WIN32_NT") Then Return 0
     
    If $OnOff Then
       $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
        Return 1
    ElseIf IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I think you can do that by turning off XP themes before you create the tab and tab items items then turn XP themes back on afterwards

Global $XS_n

$Gui = GuiCreate("Whatever....
;create something

XPStyleToggle(1);turn of XP themes
;create your tab here
XPStyleToggle(0)
GUISetState()



Func XPStyleToggle($OnOff = 1)
    If Not StringInStr(@OSTYPE, "WIN32_NT") Then Return 0
     
    If $OnOff Then
       $XS_n = DllCall("uxtheme.dll", "int", "GetThemeAppProperties")
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0)
        Return 1
    ElseIf IsArray($XS_n) Then
        DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", $XS_n[0])
        $XS_n = ""
        Return 1
    EndIf
    Return 0
EndFunc

NICE! I like this......just what I needed.


- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

it looks even worse now:

andy: im wondering why you would want something that looks like that...

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

it looks even worse now:

andy: im wondering why you would want something that looks like that...

That looks ok to me!!

ha ha, no really, I was after some sort of control over themes. Still messing around atm, looks promising.

Thanks to this I've found:

info on themes

and other stuff.

uxtheme.dll FTW!

Edited by andybiochem

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!

Share this post


Link to post
Share on other sites

andy: have you found anything to make it looks less unattractable and more like what I posted in my first pic but without the long un-needed brownish "extension part".

is it possible for me just to make my own tab out of an image?

Share this post


Link to post
Share on other sites

andy: have you found anything to make it looks less unattractable and more like what I posted in my first pic but without the long un-needed brownish "extension part".

is it possible for me just to make my own tab out of an image?

What is the problem with the method I showed? I don't see any difference between a normal tab and the tab created with the XP theme turned of except that there is no brown line. I thought that was what you wanted to get rid of. As far as I can see it's exactly like whah you posted except that there is no brown highlight mark, so one of us is not understanding something.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

martin:

Did you see the second picture I posted? Its the tab that got created without XP Themes. And it looks like Windows 95.

Sure it gets rid of the brown line but I don't want it to look so ugly.

Sorry if I seem rude but thats how I see how the tab with no theme looks.

Edit: It actually doesnt' get rid of the brown line. Its just the brown line blends in better with the whole tab now because its the same color.

Maybe I have gone wrong and mine looks different than what its supposed to. Why don't you post a picture with a tab with no XP Theme. Maybe I've gone wrong somewhere.

Edited by nowagain

Share this post


Link to post
Share on other sites

martin:

Did you see the second picture I posted? Its the tab that got created without XP Themes. And it looks like Windows 95.

Sure it gets rid of the brown line but I don't want it to look so ugly.

Sorry if I seem rude but thats how I see how the tab with no theme looks.

Edit: It actually doesnt' get rid of the brown line. Its just the brown line blends in better with the whole tab now because its the same color.

Maybe I have gone wrong and mine looks different than what its supposed to. Why don't you post a picture with a tab with no XP Theme. Maybe I've gone wrong somewhere.

I don't see any brown mark but you're right about it looking like Win95 and I'm wrong that it looks no different apart from the brown line.

The nearest I can see at the moment is by modify a post by Valik

#include <GuiConstantsEx.au3>
#include <GuiTab.au3>
#include <staticconstants.au3>
Global $ColorTab, $TabItem, $go, $msg

$main = GUICreate ("Test", 400,300)
;GUISetBkColor (0)
$ColorTab = GUICtrlCreateLabel("", 0, 0, 1, 1, BitOR($SS_NOTIFY, $SS_CENTER, $SS_SUNKEN))
$TabItem = GUICtrlCreateTab(5, 5,390, 260)
GUICtrlCreateTabItem ("Tab item - 1")
GUICtrlCreateTabItem ("")
GUICtrlCreateTabItem ("Tab item - 2")
GUICtrlCreateTabItem ("")
GUICtrlCreateTabItem ("Tab item - 3")
GUICtrlCreateTabItem ("")
GUICtrlCreateTabItem ("Tab item - 4")
GUICtrlCreateTabItem ("")
$go = GUICtrlCreateButton ("test", 5, 270, 390,25)

_GUICtrlTab_SetCurSel(GUICtrlGetHandle($TabItem),0)
_GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),0)
TabEvent()

GUISetState ()
While 1
    $msg = GUIGetMsg ()
    If $msg = $gui_event_close Then ExitLoop
    if $msg = $TabItem Then TabEvent()
    if $msg = $go Then Tab1()
WEnd

Func TabEvent()
    Local $l_tab, $l_tabX, $l_tabY, $l_margin, $l_coord, $l_text
 ; $test = IniRead ("test.ini", "Selected", "Tab item selected" , 0)
       $l_tabX = 5
    $l_tabY = 5
    $l_margin = 0
    $l_tab = _GUICtrlTab_GetCurSel(GUICtrlGetHandle($TabItem))
    $l_coord = _GUICtrlTab_GetItemRect(GUICtrlGetHandle($TabItem), $l_tab); Get coordinates of TabItem
    $l_text = _GUICtrlTab_GetItemText(GUICtrlGetHandle($TabItem), $l_tab); Get text of TabItem
  ;If $test <> $l_tab  Then
        GUICtrlSetPos($ColorTab, $l_tabX + $l_coord[0] + $l_margin, $l_tabY + $l_coord[1] + $l_margin-2, $l_coord[2] - $l_coord[0] - ($l_margin * 2), $l_coord[3] - $l_coord[1] - ($l_margin * 2))
        GUICtrlSetData($ColorTab, $l_text)
        GUICtrlsetBkColor ($ColorTab,0xFFFFff ); set the color of the label;0xffffc0
   ;   IniWrite ("test.ini", "Selected", "Tab item selected", $l_tab)
    ;  $test = $l_tab
  ;EndIf
    _GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),$l_tab)
EndFunc
Func Tab1()
    If $msg = $go Then
        MsgBox (0, "", _GUICtrlTab_GetItemState ($main,0))
    EndIf
EndFunc

You still get the brown highlight when the cursor is over a tab, but it's just about gone otherwise. Maybe a bit more meddling will fix it.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
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
Sign in to follow this  
Followers 0