Sign in to follow this  
Followers 0
ChrisL

Back ground pic and tab menu

12 posts in this topic

#1 ·  Posted (edited)

Why can I not see the Tab menu when I have a background picture?

I can put buttons on top of the picture I can put another child gui with a transparent button but not a tab menu.

Any ideas?

#include <GUIConstants.au3>

$Form1 = GUICreate("OM2", 800, 550, 0, 51,$WS_POPUP)
$Pic1 = GUICtrlCreatePic("bg1.jpg", 0, 0, 800, 550)
GuiCtrlSetState(-1,$GUI_Disable)

$tab = GUICtrlCreateTab(10, 120, 770, 400,-1,$WS_EX_TOPMOST)
GuiCtrlSetState(-1,$GUI_ONTOP)
$on = GuictrlCreateTabItem ("OverNight")
$hotq = GuiCtrlCreateTabItem ("HotQ")
$complete = GuiCtrlCreateTabItem ("Complete")
$Error = GuiCtrlCreateTabItem ("Error")

$all=GUICreate("", 45, 31 ,60, 35,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$Form1)
$pic = GuiCtrlCreatePic ("All.gif", 0, 0,45,31)

GUISetState(@SW_SHOW,$all)
GUISetState(@SW_SHOW,$Form1)


While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit
Edited by ChrisL

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Bump same issue, it's holding me up :D any ideas?

Well i cheated and cut up my image around the controls.. lol

Edited by snikt

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Still a bit stuck with this if anyone has any ideas?

It appears that the controls are there you just can't see them, I have cheated slighty to by including them in the background image!

I would like to know the propper solution still though :D

Edited by ChrisL

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

See how this works for you:

#include <GUIConstants.au3>

$Form1 = GUICreate("OM2", 800, 550, 0, 51, BitOR($WS_CLIPCHILDREN, $WS_POPUP))
GUISetState(@SW_SHOW, $Form1)
$Pic1 = GUICtrlCreatePic("bg1.jpg", 0, 0, 800, 550)
GuiCtrlSetState(-1, $GUI_DISABLE)

$tab = GUICtrlCreateTab(10, 120, 770, 400, -1, $WS_EX_TOPMOST)
GuiCtrlSetState(-1,$GUI_ONTOP)
$on = GuictrlCreateTabItem("OverNight")
$hotq = GuiCtrlCreateTabItem("HotQ")
$complete = GuiCtrlCreateTabItem("Complete")
$Error = GuiCtrlCreateTabItem("Error")

$all = GUICreate("", 45, 31 ,60, 35, $WS_POPUP, BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD), $Form1)
$pic = GuiCtrlCreatePic ("All.gif", 0, 0, 45, 31)

GUISetState(@SW_SHOW, $all)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Ugh!!, that sucks!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

This seems to work for me:

$Form1 = GUICreate("OM2", 800, 550, 0, 51, BitOR($WS_CLIPCHILDREN, $WS_POPUP), $WS_EX_LAYERED)


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Share this post


Link to post
Share on other sites

This seems to work for me:

$Form1 = GUICreate("OM2", 800, 550, 0, 51, BitOR($WS_CLIPCHILDREN, $WS_POPUP), $WS_EX_LAYERED)

Still does not work for me and you loose part of the background using this method for some strange reason but cheers anyway

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("OM2", 800, 550, 0, 51,$WS_POPUP)
; At first create the tab
$tab = GUICtrlCreateTab(10, 120, 770, 400)
$on = GuictrlCreateTabItem ("OverNight")
$hotq = GuiCtrlCreateTabItem ("HotQ")
$complete = GuiCtrlCreateTabItem ("Complete")
$Error = GuiCtrlCreateTabItem ("Error")
GuiCtrlCreateTabItem("") ; !!!
; After finishing the tab create the background and set WS_CLIPSIBLINGS-style
$Pic1 = GUICtrlCreatePic("bg1.jpg", 0, 0, 800, 550, $WS_CLIPSIBLINGS)
GuiCtrlSetState(-1,$GUI_Disable)

$all=GUICreate("", 45, 31 ,60, 35,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$Form1)
$pic = GuiCtrlCreatePic ("All.gif", 0, 0,45,31)

GUISetState(@SW_SHOW,$all)
GUISetState(@SW_SHOW,$Form1)


While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

Greets

Holger

Share this post


Link to post
Share on other sites

Yay for Holger!!!


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#include <GUIConstants.au3>

$Form1 = GUICreate("OM2", 800, 550, 0, 51,$WS_POPUP)
; At first create the tab
$tab = GUICtrlCreateTab(10, 120, 770, 400)
$on = GuictrlCreateTabItem ("OverNight")
$hotq = GuiCtrlCreateTabItem ("HotQ")
$complete = GuiCtrlCreateTabItem ("Complete")
$Error = GuiCtrlCreateTabItem ("Error")
GuiCtrlCreateTabItem("") ; !!!
; After finishing the tab create the background and set WS_CLIPSIBLINGS-style
$Pic1 = GUICtrlCreatePic("bg1.jpg", 0, 0, 800, 550, $WS_CLIPSIBLINGS)
GuiCtrlSetState(-1,$GUI_Disable)

$all=GUICreate("", 45, 31 ,60, 35,$WS_POPUP,BitOr($WS_EX_LAYERED,$WS_EX_MDICHILD),$Form1)
$pic = GuiCtrlCreatePic ("All.gif", 0, 0,45,31)

GUISetState(@SW_SHOW,$all)
GUISetState(@SW_SHOW,$Form1)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

Greets

Holger

Thank you holger, can you explain why to me, because other functions work as per my original code just not tabs? And also in the help file there is no mention of having to do this just merely disable the picture control.

I am however very very greatful as I can now get on :D

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