Jump to content
Sign in to follow this  
FaT3oYCG

[Resolved] Picture ontop of tab?

Recommended Posts

FaT3oYCG

Hi im having a little problem with a gui that i am creating, whenever i place a picture container ontop of a tab controll item it always appears underneath the tab. Yet i know that the picture container is applied to that tab as when i resize the tab control so that it is out of view and swap between the tabs i am able to see it, does anyone know why or am i going to have to use this horrible hack method

#include <ButtonConstants.au3>
 #include <EditConstants.au3>
 #include <GUIConstantsEx.au3>
 #include <StaticConstants.au3>
 #include <TabConstants.au3>
 #include <WindowsConstants.au3>
 
 #Region ### START Koda GUI section ###
 $Main = GUICreate("gui title", 529, 403, -1, -1, BitOR($WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_SYSMENU,$WS_CAPTION,$WS_POPUP,$WS_POPUPWINDOW,$WS_GROUP,$WS_TABSTOP,$WS_BORDER,$WS_CLIPSIBLINGS))
 $txtIP = GUICtrlCreateInput("default text", 408, 120, 89, 21)
 $lblIP = GUICtrlCreateLabel("another label on my gui:", 352, 123, 58, 17)
 $lblPRT = GUICtrlCreateLabel("a label on my gui:", 352, 146, 66, 17)
 $txtPRT = GUICtrlCreateInput("default text", 416, 144, 81, 21)
 $btnINT = GUICtrlCreateButton("button on my gui.", 352, 168, 145, 25, 0)
 $Tab1 = GUICtrlCreateTab(8, 8, 457, 25)
 GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
 $TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
 $Pic1 = GUICtrlCreatePic(".\test.jpg", 16, 48, 213, 170, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
 $TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
 $Input1 = GUICtrlCreateInput("Input1", 200, 88, 81, 21)
 $Label1 = GUICtrlCreateLabel("Label1", 96, 104, 36, 17)
 $Button1 = GUICtrlCreateButton("Button1", 128, 160, 89, 97, 0)
 GUICtrlCreateTabItem("")
 GUISetState(@SW_SHOW)
 #EndRegion ### END Koda GUI section ###
 
 While 1
 $nMsg = GUIGetMsg()
 Switch $nMsg
 Case $GUI_EVENT_CLOSE
 Exit
 Case $Main
 EndSwitch
 WEnd

i only changed the code that is displayed on my labels and its not in any particular place i was just doing tests because of this.

please someone help.

Edited by FaT3oYCG

Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

Share this post


Link to post
Share on other sites
martin

Why have you used the style $WS_CLIPSIBLINGS for the Pic?

This seems to work but maybe I don't understand what you want to do.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ###
$Main = GUICreate("gui title", 529, 403, -1, -1, BitOR($WS_MAXIMIZEBOX, $WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_GROUP, $WS_TABSTOP, $WS_BORDER, $WS_CLIPSIBLINGS))
$txtIP = GUICtrlCreateInput("default text", 408, 120, 89, 21)
$lblIP = GUICtrlCreateLabel("another label on my gui:", 352, 123, 58, 17)
$lblPRT = GUICtrlCreateLabel("a label on my gui:", 352, 146, 66, 17)
$txtPRT = GUICtrlCreateInput("default text", 416, 144, 81, 21)
$btnINT = GUICtrlCreateButton("button on my gui.", 352, 168, 145, 25, 0)
$Tab1 = GUICtrlCreateTab(8, 8, 300, 350)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("TabSheet1")
$Pic1 = GUICtrlCreatePic("xpclean.jpg", 16, 48, 213, 50, BitOR($SS_NOTIFY, $WS_BORDER));, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS))
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$Input1 = GUICtrlCreateInput("Input1", 200, 88, 81, 21)
$Label1 = GUICtrlCreateLabel("Label1", 96, 104, 36, 17)
$Button1 = GUICtrlCreateButton("Button1", 128, 160, 89, 97, 0)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Main
    EndSwitch
WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
FaT3oYCG

thankyou sorry i dont know wht that style is used i am using koda form designer and it just cam up that way thanks that does what i want.


Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

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  

×