E1M1 Posted January 22, 2011 Share Posted January 22, 2011 Hi. I Found that I cant use GUICtrlCreatePic on tab, but it works perfectly without tab. I need to display image on tab item but I cant find explanation to my problem. If anyone would be so nice and help me out, I certainly appreciate that. Why I dnon't see image with this code? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Firma andmed", 419, 389, 192, 114) $tab = GUICtrlCreateTab(0, 0, 400, 380) GUICtrlCreateTabItem("tab1") GUICtrlCreateLabel("txt", 20, 20, 20, 20) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\bk.bmp", 152, 88, 100, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But see with this? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Firma andmed", 419, 389, 192, 114) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\bk.bmp", 152, 88, 100, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks In advance edited Link to comment Share on other sites More sharing options...
bogQ Posted January 22, 2011 Share Posted January 22, 2011 Its $WS_CLIPSIBLINGS problem, you put picture behinde tab. set tab sized to smaller and youl see picture behinde tab ^^ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
somdcomputerguy Posted January 22, 2011 Share Posted January 22, 2011 (edited) This, from the helpfile (GUICtrlCreatePic) may assist,If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). This is not enough for Tab or Listview control which behave differently. In this case you need to create the picture with the $WS_CLIPSIBLINGS style, GuiCtrlSetState(-1,$GUI_ONTOP) is necessary for the Tab, TreeView or Listview control.edit: well I was a bit slow, but at least I was thinking right.. Edited January 22, 2011 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
E1M1 Posted January 22, 2011 Author Share Posted January 22, 2011 Thank you verymuch. edited 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