Sign in to follow this  
Followers 0
zvvyt

Making tabs transparent?

11 posts in this topic

Hello!

Is it possible to make the background of a tab transparent to f.ex show the backgroundimage of a underlying GUI?

According to the help-file the GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT) don't work w/ GUICtrlCreateTab

It won't do to just set the image to show inside of the tabs instead of this.

Any suggestions or solution if this is possible?

I saw that this had been asked on the forums a few years back, but that problem didn't get solved.

Best regards,

zvvyt

Share this post


Link to post
Share on other sites



Bumping for my own interests

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I don't think it is possible with the standard tab control, but it is possible to create it by your own, something like I did when I made my OwnTab-UDF.

Edited by funkey

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Share this post


Link to post
Share on other sites

Thanks for your reply!

Was as I suspected then ..

As I'm not that "highlvl" when it comes to programming I don't know either how to make my own UDFs or even where to start thinking in the startphase.

Would you perhaps share your UDF with me, or gimme a hint to where to begin? :)

Best regards,

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Actually, it is possible, its just that the result doesn't look good.

There are many things to fix...

The ownerdrawing of tabs is also broken because a classic theme 3D border is painted after returning from WM_DRAWITEM

that draws on top of anything painted.

Let's face it, the Tab control, like many of the standard/common controls is an old, unfinished, never updated/upgraded buggy piece of crap

that was designed only for Microsoft's internal use in its OS.

These flawed controls waste the time of countless numbers of programmers every generation.

That's why there is the managed code layer that adds features, or the improved controls in other languages or third party controls.

None of which we can currently use in AutoIt...

Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

That's quite sad to hear actually .. =/

But then you (all) might have a better workaround for the problem I'm currently having with my script!

At the moment I'm having a menu-ish program with lots (LOTS) of icons at each categorys end.

Instead of constantly hiding and showing the icons once one of the categorybuttons have been pressed I've made it up by having all the different "subcategories" placed on separate child-guis, so the buttons now only hide/show the child-gui requested. By having a total of 20+ childwindows I notice that it's taking up way too much of the computers power to have it run flawlessly, so that's when I thought of using transparent tabs instead!

Almost all of the windows have a scrollbar each created by the use of Melba23's GUIScrollbars_Ex-UDF, and are transparent due to a backgroundimage in the parent which I don't want to move when I scroll.

Any suggestions are much appreciated!

Best regards,

Share this post


Link to post
Share on other sites

zvvyt,

Have you thought of using my GUIExtender UDF to have separate sections for each "subcategory" rather than multiple tabs? :huh:

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

Have you thought of using my GUIExtender UDF to have separate sections for each "subcategory" rather than multiple tabs? :huh:

M23

Haven't heard of that, and have no clue of what it can do. So no.. :ermm:

Share this post


Link to post
Share on other sites

zvvyt,

Then why not take a look and see if it might do what you want. Basically it allows you to have multiple sections of a GUI and decide which are visible at any given time. It sounds to me like it might just be what you are looking for. ;)

You can download it from the link in my sig and I would be happy to help you get it to work in your script. :)

M23

2 people like this

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

Then why not take a look and see if it might do what you want. Basically it allows you to have multiple sections of a GUI and decide which are visible at any given time. It sounds to me like it might just be what you are looking for. ;)

You can download it from the link in my sig and I would be happy to help you get it to work in your script. :)

M23

Oh, my ..

After a quick readthrough I feel like I'll have to completely re-write my script and base it all around your UDF for this to work.

Looks awesome, but will have to have a more careful readthrough tomorrow :D

And trust me, you'd definately hear from me again about your UDF ^__^'

Best regards,

Share this post


Link to post
Share on other sites

zvvyt,

Fine, but I would start with a script containing just a few of those 20+ sections so we have a manageable sized GUI to begin with! :D

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

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

  • Similar Content

    • Skeletor
      By Skeletor
      Hi All,
      I know many newbies search for this feature.
      I decided to share this piece of code with everyone.
      Basically its a "splash screen" that has a transparent image.
      In a nutshell - Gui with a transparent gif.
      Enjoy...
      Download attachment....
       
      Splash Screen GUI.zip
    • kawliga751
      By kawliga751
      I am trying to script the opening of multiple tabs in IE with each tab having a separate login/password. I have been able to make a successful script that will open 3 separate IE sessions with the correct webpage and login or a script that will open 3 tabs in one session (which I want) but will not login. I have tried _IECreate, IEAttach etc. This is the script I am currently using . 
      #include <IE.au3> Const $navOpenInNewTab = 0x0800 Dim $oIE = _IECreate('http://asag.xxxxxxx.com/AAAA/index.htm') ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) ;$o_IE.Navigate2('http://asag.xxxxxxx.com/apps/yyyyyyy/LogInSAG/login.asp', $navOpenInNewTab) Call ("YYYYYYYSignIn") Func YYYYYYYSignIn () Local $username = _IEGetObjByName ($oIE,"uname") Local $password = _IEGetObjByName ($oIE,"pword") $oIE.Navigate2('http://asag.xxxxxxx.com/apps/xxxxxxx/LogInSAG/login.asp',2048) _IEFormElementSetValue ($username, "xxxxxxx") _IEFormElementSetValue ($password, "xxxxxxx") Send('{Enter}') EndFunc Call ("xxxxxxxSignIn") Func xxxxxxxSignIn () __IENavigate($oIE, "https://soa1gui.xxxxxxx.biz/gateway/NFServlet;jsessionid=1E3B8F6520DE0A1EC914A8ABB7E86341?NFH_MessageId=&NFH_Page=%2fpages%2fsearch%2fsearch.jsp", 1, 0x800) Local $domain = _IEGetObjByName ($oIE,"NF_CustomerID") Local $User_Name = _IEGetObjByName ($oIE,"NF_UserName") Local $Password = _IEGetObjByName ($oIE,"NF_Password") _IEFormElementSetValue ($domain, xxxxxxx") _IEFormElementSetValue ($User_Name, "xxxxxxx") _IEFormElementSetValue ($Password, "xxxxxxx") ;Send('{Enter}') EndFunc  
    • Skeletor
      By Skeletor
      Hi Guys,
      I've been reading this post ...
      When I came accross the examples, non of them had what I was looking for.
      I basically want to "snapshot" my GUI's multiple tabs and send them into the pdf.
      A little nudge from you guys would be great.
      Im really stuck with this one, therefore I have no code.
      Lets discuss or point me in a right direction... thanks alot
       

    • VIP
      By VIP
      Like this:


      GUICtrlCreateTab on Top eg:
      #include <GUIConstantsEx.au3> Example() Func Example() GUICreate("My GUI Tab") ; will create a dialog box that when displayed is centered GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) GUICtrlCreateTab(10, 10, 200, 100) GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlCreateInput("default", 80, 50, 70, 20) GUICtrlCreateTabItem("tab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo|guinness", "Jon") ; default Jon GUICtrlCreateButton("OK1", 80, 50, 50, 20) GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label2", 30, 80, 50, 20) GUICtrlCreateButton("OK2", 140, 50, 50) GUICtrlCreateTabItem("") ; end tabitem definition GUICtrlCreateLabel("label3", 20, 130, 50, 20) GUISetState(@SW_SHOW) Local $idMsg ; Loop until the user exits. While 1 $idMsg = GUIGetMsg() If $idMsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example  
    • fopetesl
      By fopetesl
      OK, still learning SOLVED! $WS_EX_COMPOSITED hides buttons?
      I've read, run examples but cannot show action buttons in tabs in a GUI.
      I've run the GUICtrlCreateTabItem function example and, of course, it works.
      Mine doesn't:
      #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> #include <MenuConstants.au3> #include <TabConstants.au3> #include <ColorConstants.au3> $hGUI = GUICreate("My GUI Tab", @DesktopWidth * 1, @DesktopHeight * 1, 0, 0,-1, $WS_EX_COMPOSITED) $hTab = GUICtrlCreateTab(10, 10, 640, 480,$TCS_HOTTRACK) ; Create tabitems ;For $i = 0 To 2 GUICtrlCreateTabItem(" Scan Sample ") ; $idButton1 = GUICtrlCreateButton("Button " & 0, 20 + (0 * 100), 40 + (0 * 50), 80, 30) ; $idButton1 = GUICtrlCreateButton("00", 20, 50, 80, 30) GUICtrlCreateLabel("label0", 30, 80, 50, 20) GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlCreateInput("default", 80, 50, 70, 20) GUICtrlCreateTabItem(" Database ") GUICtrlCreateButton("Button " & 1, 20 + (1 * 100), 40 + (1 * 50), 80, 30) GUICtrlCreateTabItem(" Software ") GUICtrlCreateButton("Button " & 2, 20 + (2 * 100), 40 + (2 * 50), 80, 30) ;Next ; Close Tab definiton GUICtrlCreateTabItem("") ; Set the color of the label control. ; GUICtrlSetColor($idButton1, 0x002E7A) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd It just shows:
      whatever I try.  So I've missed, again?, that I do not have the focus?