Jump to content

Help me remove background color icon on tab.


Recommended Posts

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

Link to post
Share on other sites

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
Link to post
Share on other sites
  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to post
Share on other sites

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
Link to post
Share on other sites
  • Moderators

Yashied,

Very nice.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...