Jump to content

Back ground pic and tab menu


Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

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

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.

Link to comment
Share on other sites

  • Moderators

Ugh!!, that sucks!

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.

Link to comment
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]

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...