Jump to content

How to Show\Hide Tab


Recommended Posts

hello everyone, got a question

example

#Include <WindowsConstants.au3>


Func getCurrent ($type)
    Local $_coord = MouseGetPos()
    
    Select
    Case $type = "x"
        Return $_coord[0]
    Case $type = "y"
        Return $_coord[1]
    EndSelect
EndFunc


local $cur_x, $cur_y
Local $tab_main 
Local $tab1, $tab2

$GUI =          GUICreate ('MyGUI', 400, 400)


$tab_main =     GUICtrlCreateTab(10, 10, 380, 380)

$tab1 =         GUICtrlCreateTabItem('Item1')
                GUICtrlCreateGroup("some",      20,     40,     85,     75)
                GUICtrlCreateLabel("X = ",          28,     55,     20,     15)
$cur_x =        GUICtrlCreateLabel("",              48,     55,     25,     15)
                GUICtrlCreateLabel("Y = ",          28,     75,     20,     15)
$cur_y =        GUICtrlCreateLabel("",              48,     75,     25,     15)
                GUICtrlCreateTabItem('')
                
$tab2 = GUICtrlCreateTabItem('Item2')
        
                GUICtrlCreateTabItem('')

GUISetState(@SW_SHOW, $GUI)



While 1

GUICtrlSetData($cur_x, getCurrent("x"))
GUICtrlSetData($cur_y, getCurrent("y"))

    Switch GUIGetMsg()
        Case -3
            Exit

    EndSwitch
WEnd

in $tab1 we see current coordinates of mouse (just example for better understanding of problem - it very quick updates)

when we change tab to $tab2 we see blinks on those places, how to use @SW_HIDE in my example? or how to "hide" $tab1 totally (when active is $tab2)?

- I want program that crack all other programs...- Let's split up, i'll search this program and you'll find crack for it. ^_^'

Link to comment
Share on other sites

  • Moderators

sergeyWolf,

I see no "blinks on those places" - when $tab2 is active I get no breakthrough from $tab1. Do you have any special themes enabled (Aero for example) which might affect GUI behaviour? :huh2:

On a side point, you only need to close the tab definiton once - the first GUICtrlCreateTabItem('') at line 28 is not needed. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

sergeyWolf,

I see no "blinks on those places" - when $tab2 is active I get no breakthrough from $tab1. Do you have any special themes enabled (Aero for example) which might affect GUI behaviour? :huh2:

On a side point, you only need to close the tab definiton once - the first GUICtrlCreateTabItem('') at line 28 is not needed. :ph34r:

M23

i use simple theme :alien: and yes, i talking about breakthrough (my english so-so ;))

here I noticed

#Include <WindowsConstants.au3>

$hForm = GUICreate('MyGUI', 400, 400)

$hTab = GUICreate('', 300, 300, 50, 50, BitOR($WS_CHILD, $WS_TABSTOP), -1, $hForm)
$Tab2 = GUICtrlCreateTab(0, 0, 300, 300)
GUICtrlCreateTabItem('Item3')
GUICtrlCreateTabItem('Item4')
GUICtrlCreateTabItem('')

GUISwitch($hForm)

$Tab1 = GUICtrlCreateTab(10, 10, 380, 380)
GUICtrlCreateTabItem('Item1')
GUICtrlCreateTabItem('Item2')
GUICtrlCreateTabItem('')

GUISetState(@SW_SHOW, $hForm)
GUISetState(@SW_SHOW, $hTab)

While 1
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $Tab1
            Switch GUICtrlRead($Tab1)
                Case 0
                    GUISetState(@SW_SHOW, $hTab)
                Case 1
                    GUISetState(@SW_HIDE, $hTab)
            EndSwitch
    EndSwitch
WEnd

if i put group (from first example) "some" to Item4 and change tab to Item2 there would not be this breakthrough

ps: copy pasted from link

Edited by sergeyWolf

- I want program that crack all other programs...- Let's split up, i'll search this program and you'll find crack for it. ^_^'

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