Jump to content

GUICtrlCreateTab


ptrex
 Share

Recommended Posts

Link to comment
Share on other sites

Is there a way that if a Gui has a GUICtrlCreateTab with multiple TABS,

That I can (by clicking a button) jump to another TAB.

Lets say you have 3 tabs.

When positioned on Tab 1 clicking a button would jump to Tab 3.

<{POST_SNAPBACK}>

yes GUICtrlSetState($tabitem,$GUI_SHOW)

Written in the doc :whistle:

Link to comment
Share on other sites

@jpm

I am not that long in AutoIT and learning every day.

So thanks for the fast reply !!

<{POST_SNAPBACK}>

For example:

#Include <GUIConstants.au3>
; Includes all the GUI variable constants.

GUICreate ("", 150, 150)
: Creates main window 150-wide 150-tall

$Tab = GUICtrlCreateTab (0, 0, 150, 150) 
; Creates main tab 

   $Tab1 = GUICtrlCreateTabItem ("Tab1")
      $Button1 = GUICtrlCreateButton ("Click to go to Tab 2", 6, 28, 138, 116)
; Create first actual tab and button 6-right 28-down 138-wide 116-tall
 
   $Tab2 = GUICtrlCreateTabItem ("Tab2")
      $Button2 = GUICtrlCreateButton ("Click to go to Tab 1", 6, 28, 138, 116)
; Create second actual tab and button 6-right 28-down 138-wide 116-tall

GUISetState ()
; Sets the window and tabs to be shown

While 1
   $Get = GUIGetMsg ()
  ; Gets an event

   Select
      Case $Get = $GUI_EVENT_CLOSE
        ExitLoop
      Case $Get = $Button1; If the event is Button1 show Tab2
        GUICtrlSetState ($Tab2, $GUI_SHOW)
      Case $Get = $Button2; If the event is Button2 show Tab1
    GUICtrlSetState ($Tab1, $GUI_SHOW)
   EndSelect
  ; Type of "IF" statement

WEnd
; Loop statement

Something kind of like that. If you want a more in depth explaination, you can always send me an email at frozenyam@hotmail.com

Edited by Frozenyam

"... and the Lord said to John, "Come forth and ye shall receive eternal life," but instead John came fifth and won a toaster."

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