Yashied Posted March 3, 2009 Share Posted March 3, 2009 If you place an icon on top of the Tab control then it will have a white background color. Why? I hope that this bug (feature) will be fixed in the AutoIt v3.3.0.0, but it is there. It is time to make compromises (degrade code), it is very inconvenient. Developers, will the next version of AutoIt is corrected?GUICreate('Test', 380, 400) GUICtrlCreateTab(10, 10, 360, 380) GUICtrlCreateTabItem('Tab') GUICtrlCreateIcon('shell32.dll', -7, 40, 65, 32, 32) GUISetState() do until GUIGetMsg() = -3Also has the following bug: http://www.autoitscript.com/forum/index.php?showtopic=89387It is like that in the following versions of AutoIt has improved support for Icon and Tab controls.Thanks. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
GEOSoft Posted March 3, 2009 Share Posted March 3, 2009 I don't see what you are getting at here. What I'm seeing is the default tab color. GUICreate('Test', 380, 400) GUICtrlCreateTab(10, 10, 360, 380) GUICtrlCreateTabItem('Tab') ;GUICtrlCreateIcon('shell32.dll', -7, 40, 65, 32, 32) GUICtrlCreateLabel("This is some text", 40, 65, 160, 20) GUISetState() do until GUIGetMsg() = -3 And GUICreate('Test', 380, 400) GUICtrlCreateTab(10, 10, 360, 380) GUICtrlCreateTabItem('Tab') ;GUICtrlCreateIcon('shell32.dll', -7, 40, 65, 32, 32) ;GUICtrlCreateLabel("This is some text", 40, 65, 160, 20) GUISetState() do until GUIGetMsg() = -3 Give the same results. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2009 Moderators Share Posted March 3, 2009 GEOSoft, I thought the same thing, until I coloured the Tab:#include <GuiConstantsEx.au3> #include <GuiTab.au3> $hGUI = GUICreate('Test', 380, 400) GUISetBkColor(0Xff0000, $hGUI) GUICtrlCreateIcon('shell32.dll', -7, 10, 10, 32, 32) $hTab = GUICtrlCreateTab(50, 10, 300, 380) GUICtrlCreateTabItem('Tab') _GUICtrlTab_SetBkColor($hGUI, $hTab, 0x00FF00) GUICtrlCreateIcon('shell32.dll', -7, 80, 65, 32, 32) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0]+2, $aTabPos[1]+$aTab_Rect[3]+4, $aTabPos[2]-6, $aTabPos[3]-$aTab_Rect[3]-7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc I presume Yashied is running with a non-standard tab background colour which makes the white icon background stand out. M23  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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
Yashied Posted March 3, 2009 Author Share Posted March 3, 2009 I don't see what you are getting at here. What I'm seeing is the default tab color.GUICreate('Test', 380, 400) GUICtrlCreateTab(10, 10, 360, 380) GUICtrlCreateTabItem('Tab') GUICtrlCreateIcon('shell32.dll', -7, 40, 65, 32, 32) GUISetState() Opt('PixelCoordMode', 2) MsgBox(0, '', 'Tab color: ' & '0x' & StringRight(Hex(PixelGetColor(39, 65)), 6) & @CR & @CR & 'Icon background color: ' & '0x' & StringRight(Hex(PixelGetColor(40, 65)), 6)) My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
GEOSoft Posted March 3, 2009 Share Posted March 3, 2009 Okay I see it now. It's not picking up the transparency. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
jpm Posted March 3, 2009 Share Posted March 3, 2009 The overlapping of control is user reponsability so painting a label and creating on icon that overlap does not means that the icon will take label painting . The icon is paint as as tab. as a tab cannot be paint you get the transparency on the tab that to say white or grey depending of the theme Link to comment Share on other sites More sharing options...
Yashied Posted March 3, 2009 Author Share Posted March 3, 2009 The overlapping of control is user reponsability so painting a label and creating on icon that overlap does not means that the icon will take label painting .The icon is paint as as tab. as a tab cannot be paint you get the transparency on the tab that to say white or grey depending of the themejmp, please look at my example (Post #4), I do not use any filling, it is a standard color tab. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
jpm Posted March 3, 2009 Share Posted March 3, 2009 jmp, please look at my example (Post #4), I do not use any filling, it is a standard color tab.For me it is working as designed the icon backgound is the same as the tab background. verified with vista style (white) or classic theme (grey) Link to comment Share on other sites More sharing options...
jvanegmond Posted March 3, 2009 Share Posted March 3, 2009 For me it is working as designed the icon backgound is the same as the tab background. verified with vista style (white) or classic theme (grey)Same. Windows XP classic. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Yashied Posted March 3, 2009 Author Share Posted March 3, 2009 Same. Windows XP classic.I think it works differently for different themes. I use Windows XP with default (not classic) theme.Thanks. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 3, 2009 Share Posted March 3, 2009 The icon will not take the background of what is behind it. It will take the background of the form color. This is by design. There is no real transparency in non-layered windows. Link to comment Share on other sites More sharing options...
jpm Posted March 3, 2009 Share Posted March 3, 2009 I think it works differently for different themes. I use Windows XP with default (not classic) theme.Thanks.You right different behavior due to the way autoit can find the back color of a tab (upper left pixel) Link to comment Share on other sites More sharing options...
Yashied Posted March 3, 2009 Author Share Posted March 3, 2009 The icon will not take the background of what is behind it. It will take the background of the form color. This is by design. There is no real transparency in non-layered windows.I know that. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted March 3, 2009 Author Share Posted March 3, 2009 You right different behavior due to the way autoit can find the back color of a tab (upper left pixel)In this case, use PixelGetColor() is not good. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Valik Posted March 3, 2009 Share Posted March 3, 2009 Your test is wrong. This test is correct:GUICreate('Test', 380, 400) GUICtrlCreateTab(10, 10, 360, 380) Local $hTab = GUICtrlGetHandle(GUICtrlCreateTabItem('Tab')) GUICtrlCreateIcon('shell32.dll', -7, 40, 65, 32, 32) GUISetState() Opt('PixelCoordMode', 2) MsgBox(0, '', 'Tab color: ' & '0x' & StringRight(Hex(PixelGetColor(0, 0, $hTab)), 6) & @CR & @CR & 'Icon background color: ' & '0x' & StringRight(Hex(PixelGetColor(40, 65)), 6))My code gets the top-left pixel of the Tab control unconditionally. Your test is relying on what you see and not what AutoIt sees. My test confirms that AutoIt is working as designed. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 3, 2009 Moderators Share Posted March 3, 2009 (edited) Addressed to the Devs,The Help file states: "To have a transparent picture it is needed to create the GUI window with WS_EX_LAYERED extended style. The left-top pixel will be used as the transparency color. If several pictures are created the last picture is defining the transparent color. See example 2."Would it be it very difficult to change the code to look at the left-top of the pixel under the Pic/Icon control rather than the underlying Tab/GUI? I can imagine such a solution would still respect "the last picture is defining the transparent color", but offer a little more flexibility to the user.I am quite prepared to believe that this would be too difficult to incorporate, but I ask out of curiosity.M23Edit: speeling Edited March 3, 2009 by Melba23  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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area  Link to comment Share on other sites More sharing options...
Yashied Posted March 4, 2009 Author Share Posted March 4, 2009 (edited) Your test is wrong. This test is correct:Valik, please look at my screenshot. I work in Windows XP with Default (not Windows Classic) Windows XP theme. What this? And what can you say on the second issue? http://www.autoitscript.com/forum/index.php?showtopic=89387I think that there is a need to improve support for icons in future versions of the AutoIt. Edited May 12, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
GEOSoft Posted March 4, 2009 Share Posted March 4, 2009 It's already been pointed out that the issue is with painting the tab. If you look in the list of things that won't be changed, it's in there. It's a major issue to make the modifications and the icons are working as designed. Remember that not everything will be possible in AutoIt. If the AutoIt base code ever changes then changes like you want may get addressed but I wouldn't look for it to happen in the next 2 or 3 days. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now