Jump to content

Xskin tabs


dufran3
 Share

Recommended Posts

Trying to get Xskin tabs to work the way I want. I have a GUI windows, and I would like 3 tabs. I would like the tabs to fill the inside of the window. If you look at the code, meaning run it, you can see that the left and rides sides of the tab window, fall short, no matter how wide I make them, they aren't wide enough. Any ideas?

#include <XSkin.au3>
#include <GuiConstants.au3>
#include <XSkinTabs.au3>
#include <_ButtonHover.au3>
#include <XSkinToolbar.au3>

Opt("GUIOnEventMode", 1)

$Skin_Folder = 'C:\Temp\xSkin\'

If Not FileExists("C:\Temp\Xskin") Then
    DirCreate('C:\Temp\Xskin')
EndIf

;Copy Xskin Files to local drive
$FileCheck = FileExists($Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\1.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\2.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\3.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\4.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\5.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\6.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\7.bmp', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\skin.dat', $Skin_Folder)
FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\logo_kmc.jpg', $Skin_Folder)

    ;XSkin
    $main1 = XSkinGUICreate("Testing", 400, 500, $Skin_Folder)
    
    ;Toolbar
    ;$h_toolbar = XSkinToolBarCreate($main1, 0,0,450,'#000000')
    ;$TButton1 = XSkinToolBarButton(22)
    
    ;GUI
    GUISetIcon("H:\AutoIt\pc.ico", 0)
    TraySetIcon("H:\AutoIt\pc.ico")
    GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")


    ;PIC
    ;GUICtrlCreatePic($Skin_Folder & "\logo_kmc.jpg", 16, 37, 368, 60)
    
    ;TABS
    $Tab1 = XSkinColorTabCreate(45, 97, 306, 340,$GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreateTabItem("Applications")
    ;$main1 = GUICtrlCreateLabel("Inside Tab 1", 225, 125, 152, 17) ; mouse-over color
    ;GUICtrlCreateTabItem("Power Skin")
    ;GUICtrlCreateLabel("Inside Tab 2", 225, 125, 102, 17)
    ;GUICtrlCreateTabItem("XSkin !")
    ;GUICtrlCreateLabel("Inside Tab 3", 225, 125, 102, 17)
    
;   GUISetState()

;While 1
  ;  $msg = GUIGetMsg()
   
 ;   If $msg = $TButton1 Then MsgBox(64, "test 1", "you pressed Button #1     ", 3)
   
;WEnd

;GUI MESSAGE LOOP
GUISetState()
While GUIGetMsg() <> $GUI_EVENT_CLOSE
WEnd



Func SpecialEvents()
    
    
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Exit
            
    EndSelect
    
EndFunc   ;==>SpecialEvents
Link to comment
Share on other sites

Like This???

Posted Image

#include <XSkin.au3>
#include <GuiConstants.au3>
#include "XSkinTab.au3"
#include <_ButtonHover.au3>
#include <XSkinToolbar.au3>

Opt("GUIOnEventMode", 1)


$Skin_Folder = @ScriptDir & "\Skins\Defacto"
;$Skin_Folder = 'C:\Temp\xSkin\'

;If Not FileExists("C:\Temp\Xskin") Then
;    DirCreate('C:\Temp\Xskin')
;EndIf

;Copy Xskin Files to local drive
;$FileCheck = FileExists($Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\1.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\2.bmp', $Skin_Folder)
;;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\3.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\4.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\5.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\6.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\7.bmp', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\skin.dat', $Skin_Folder)
;FileInstall('\\fs1\IS stuff\NewPC\Automated Installs\Files\xSkin\logo_kmc.jpg', $Skin_Folder)

    ;XSkin
    $main1 = XSkinGUICreate("Testing", 400, 500, $Skin_Folder)
   
   $Icon_Folder = @ScriptDir & "\Skins\Default"
    $XIcon = XSkinIcon ($main1, 1)
   
    ;GUI
    GUISetIcon("H:\AutoIt\pc.ico", 0)
    TraySetIcon("H:\AutoIt\pc.ico")
    GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")


    ;PIC
    ;GUICtrlCreatePic($Skin_Folder & "\logo_kmc.jpg", 16, 37, 368, 60)
   
    ;TABS
    $Tab1 = XSkinColorTabCreate(20, 90, 360, 377, $over_color) ;GUI_BKCOLOR_TRANSPARENT)
    GUICtrlCreateTabItem("Applications")
    ;$main1 = GUICtrlCreateLabel("Inside Tab 1", 225, 125, 152, 17) ; mouse-over color
    GUICtrlCreateTabItem("Power Skin")
    ;GUICtrlCreateLabel("Inside Tab 2", 225, 125, 102, 17)
    GUICtrlCreateTabItem("XSkin!")
    ;GUICtrlCreateLabel("Inside Tab 3", 225, 125, 102, 17)
   GUICtrlCreateTabItem("XSkin Tabs!")
   GUICtrlCreateTabItem("XSkin Color!")
   GUISetState()

;While 1
  ;  $msg = GUIGetMsg()
   
 ;   If $msg = $TButton1 Then MsgBox(64, "test 1", "you pressed Button #1     ", 3)
   
;WEnd

 ;Toolbar
    $h_toolbar = XSkinToolBarCreate($main1, 40,50,310,'#000000')
    $TButton1 = XSkinToolBarButton(22)
    
GUISetState()

WinSetOnTop( $h_toolbar, "", 1) ; does not work
GUICtrlSetState( $Tab1, $GUI_ONTOP) ; THIS WORKS!!!

While 1 ;GUIGetMsg() <> $GUI_EVENT_CLOSE
    Sleep(10)
WEnd



Func SpecialEvents()
   
   
    Select
        Case @GUI_CtrlId = $GUI_EVENT_CLOSE
            Exit
           
    EndSelect
   
EndFunc   ;==>SpecialEvents

8)

NEWHeader1.png

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...