Sign in to follow this  
Followers 0
john123

Help me remove background color icon on tab.

9 posts in this topic

Hi everybody.

Please help me the way to remove white color from background icon on tab. I've searched in forum but have no result.

Thanks very much.

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
$Tab1 = GUICtrlCreateTab(176, 88, 289, 193)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Icon1 = GUICtrlCreateIcon("D:\1.ico", 0, 344, 168, 72, 56, BitOR($SS_NOTIFY,$WS_GROUP))
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

http://farm4.static.flickr.com/3564/339608...3a1b8e366_m.jpg

post-47113-1238351531_thumb.png

1.ico

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Change the background color of the GUI Tabsheet to match that of the icon. Or, create a new icon with a background color that matches the GUI tabsheet. If this is even possible?? Help file time

Edit: Meant TabSheet not the GUI window.

Edited by MrMitchell

Share this post


Link to post
Share on other sites

Darn. Found "GUICtrlSetBkColor ( controlID, backgroundcolor )" but unfortunately it apparently doesn't work on tabs.

Share this post


Link to post
Share on other sites

john123,

If you look here you will see that the background colour of icons on tabs is always that of the default form colour. So even transparent icons will not behave when used on tabs - unless the colours match of course. ;-)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

john123, I changed the function _DrawCombineBkIcon() to you. I think this is what you want.

:D

#Include <SetBkIcon.au3>

Opt('PixelCoordMode', 2)

GUICreate('Test', 398, 424)
$Tab = GUICtrlCreateTab(7, 7, 386, 380)
GUICtrlSetFont(-1, 8.5, 400, 0, 'Tahoma')
GUICtrlCreateTabItem('Tab1')
$Icon = GUICtrlCreateIcon('', 0, 32, 66, 48, 48)
GUISetState()
_SetBkIcon($Icon, PixelGetColor(5, 15, GUICtrlGetHandle($Tab)), @SystemDir & '\shell32.dll', 130, 48, 48)

do
until GUIGetMsg() = -3

SetBkIcon.au3

Edited by Yashied

Share this post


Link to post
Share on other sites

Yashied,

Very nice.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thank you very much.

Have a nice day.

Share this post


Link to post
Share on other sites

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