Jump to content

GUICtrlCreateTab Help..


oren
 Share

Recommended Posts

Well its not soo easy for me to explain i've build a picture that might help..

I want to make my tabs centered...

ANd i didnt found the way to do it..

AnyHelp?

Thanks

If you mean you want your tabs to fil the width of the tab control, then check out martin's solution here: http://www.autoitscript.com/forum/index.ph...st&p=519278

You want to look at the second method he posted under "Another way is"

Edited by ResNullius
Link to comment
Share on other sites

Actually i Just want them to be in the center of the screen and that the tabs will fill the hole page...

I want the tabs to start at the center of the page...

Always the tabs start at the start of the tab .. I wants the tabs to start in the center of the tab...

I'm sorry i dont explain myself currectly...

I'll just make pictures...

I want it insted of looking like this

Posted Image

I want it to look like this

Posted Image

Link to comment
Share on other sites

Actually i Just want them to be in the center of the screen and that the tabs will fill the hole page...

I want the tabs to start at the center of the page...

Always the tabs start at the start of the tab .. I wants the tabs to start in the center of the tab...

You can make the tab control with only enough height to show the tabs and not the tab pages, Then you can put them where you like.

Here is a simple example

NOTE: I have used GuiCtrTab_ClickTab so you must use the current beta version to run this.

; Example of TAB in TAB ctrl by aec in AutoIt post
#include <GUIConstantsEx.au3>
#include <windowsconstants.au3>
#include <tabconstants.au3>
#include <guitab.au3>

Global $main_GUI, $ok_button, $cancel_button


$main_GUI = GUICreate("TAB in TAB", 260, 250, -1, -1)
$ok_button = GUICtrlCreateButton("OK", 40, 220, 70, 20)
$cancel_button = GUICtrlCreateButton("Cancel", 150, 220, 70, 20)

; Create the child window that is implemented into the main GUI
$child1 = GUICreate("", 230, 127, 15, 30, BitOR($WS_CHILD, $WS_TABSTOP), -1, $main_GUI)
GUISwitch($child1)
$child_tab = GUICtrlCreateTab(0, 0, 210, 150, BitOR($WS_CLIPSIBLINGS, $TCS_BOTTOM));put the tabs at the bottom, the window height is too small to see them.
$child11tab = GUICtrlCreateTabItem("1")
$cbtn = GUICtrlCreateButton("button B", 60, 2, 70, 18)
$edit1 = GUICtrlCreateEdit("Some text", 10, 25, 180, 100)
$child12tab = GUICtrlCreateTabItem("2")
$listview2 = GUICtrlCreateListView("Col1|Col2", 10, 10, 180, 100, -1);
GUICtrlCreateListViewItem("ItemLong1|ItemLong12", $listview2)
GUICtrlCreateListViewItem("ItemLong2|Item22", $listview2)
GUICtrlCreateTabItem("")
GUISetState()

; Switch back the main GUI and create the tabs
GUISwitch($main_GUI)
$main_tab = GUICtrlCreateTab(80, 10, 240, 20)
;note interesting effect if you do have this next line instead
;$main_tab = GUICtrlCreateTab(80, 10, 60, 20,BitOr($TCS_MULTILINE,$TCS_RIGHTJUSTIFY) )
$child1tab = GUICtrlCreateTabItem("Child1")
$child2tab = GUICtrlCreateTabItem("Child2")
GUICtrlCreateTabItem("")
;
GUISetState()
$HideShow = $GUI_HIDE + $GUI_SHOW
$chil1tabstate = True

While 1
    $msg = GUIGetMsg(1)
    Switch $msg[0]
        Case $GUI_EVENT_CLOSE
            ExitLoop
        Case $cancel_button
            
            
        Case $main_tab
            _GUICtrlTab_ClickTab($child_tab, GUICtrlRead($main_tab))
            _GUICtrlTab_SetCurFocus($child_tab, GUICtrlRead($main_tab))
    EndSwitch
WEnd
Edited by martin
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.
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...