Sign in to follow this  
Followers 0
Valuater

Tab on-top of pic not working

7 posts in this topic

this is an example

; set picture file
$pic = "C:\Program Files\AutoIt3\Examples\1Click-Optimizer\skins\Backgrnd.jpg"

#include <GUIConstants.au3>

GUICreate("My GUI Tab", 400, 300)  ; will create a dialog box that when displayed is centered

;GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)

GUICtrlCreatePic($pic, 1, 1, 398, 298) ; comment out and it works
GUICtrlSetState( -1, $GUI_DISABLE) ; this too..............

$tab=GUICtrlCreateTab (10,10, 200,100)

$tab0=GUICtrlCreateTabitem ("tab0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tab----1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,120)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab2")
GUICtrlSetState(-1,$GUI_SHOW)    ; will be display first
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

GUICtrlCreateTabitem ("")    ; end tabitem definition

GUICtrlCreateLabel ("label3", 20,130,50,20)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

thx

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites



YOU WONT BELIEVE THIS ONE>>>>>

GUISetBkColor(GUICtrlCreatePic($pic, 1, 1, 398, 298))

; set picture file
$pic = "C:\Program Files\AutoIt3\Examples\1Click-Optimizer\skins\Backgrnd.jpg"

#include <GUIConstants.au3>

GUICreate("My GUI Tab", 400, 300)  ; will create a dialog box that when displayed is centered
GUISetFont(9, 300)
; GUISetBkColor(GUICtrlCreatePic($pic, 1, 1, 398, 298))

GUISetBkColor(GUICtrlCreatePic($pic, 1, 1, 398, 298))
GUICtrlSetState( -1, $GUI_DISABLE)


;GUICtrlCreatePic($pic, 1, 1, 398, 298) ; comment out and it works
;GUICtrlSetState( -1, $GUI_DISABLE) ; this too..............

$tab=GUICtrlCreateTab (10,10, 200,100)

$tab0=GUICtrlCreateTabitem ("tab0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("default", 80,50,70,20)

$tab1=GUICtrlCreateTabitem ( "tab----1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,120)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)

$tab2=GUICtrlCreateTabitem ("tab2")
GUICtrlSetState(-1,$GUI_SHOW)    ; will be display first
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)

GUICtrlCreateTabitem ("")    ; end tabitem definition

GUICtrlCreateLabel ("label3", 20,130,50,20)


GUICtrlSetState( $tab, $GUI_ONTOP)
GUICtrlSetState( $tab, $GUI_ENABLE)
GUICtrlSetState( $tab1, $GUI_SHOW)
GUICtrlSetState( $tab1, $GUI_FOCUS)

GUISetState ()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

mouse over the tabs and you can see them.... but it does show now

just trying...

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

If a picture is set as a background picture, as the other controls will overlap, it important to disable the pic control : GuiCtrlSetState(-1,$GUI_DISABLE). This does not work with Tab control which behave differently. in this case you need to create the picture with the $WS_CLIPSIBLINGS style, some $GUI_ONTOP can still be necessary for the tab control.

Doh, ya noob, post in the wrong forum and cannot read the helpfile? :P

Share this post


Link to post
Share on other sites

Doh, ya noob, post in the wrong forum and cannot read the helpfile? :P

thanks MHz

Well... I guess i am a noob for not reading the helpfile...

but... post in the wrong forum????.. I thought support is the right place to start

thanks larry and gafrost too!

works just fine..

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

but... post in the wrong forum????.. I thought support is the right place to start

I think he was indicating that it was GUI related :P


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Man...

When you get known around here... there is no room for errors

So... the next time i have a question ( as dumb as this one )

I'm going to create a new username....maybe.... Donkey?

lol

8)


NEWHeader1.png

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