Sign in to follow this  
Followers 0
Dirk Diggler

TabItem creation problem

7 posts in this topic

i have made a little form with Koda. It contains two Tabs. I don't know why, but all TabItems creates in first tab! GUICtrlCreateTabItem("") don't work?????

using AutoIt 3.2.0.1

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Morda = GUICreate("Параметры", 705, 814, 185, 127)
$Group1 = GUICtrlCreateGroup("Идентификация", 8, 8, 241, 93)
GUICtrlCreateLabel("Имя", 16, 28, 26, 17)
$inComputerName = GUICtrlCreateInput("NAME", 44, 24, 201, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Домен", 12, 52, 39, 17)
$inDomain = GUICtrlCreateInput("inDomain", 56, 48, 189, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Рабочая группа", 12, 76, 83, 17)
$inWorkgroup = GUICtrlCreateInput("inWorkgroup", 96, 72, 149, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$IP1 = GUICtrlCreateTab(256, 8, 445, 121)
$TabSheet1 = GUICtrlCreateTabItem("IP1")
$inIP = GUICtrlCreateInput("IP1", 300, 32, 97, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("IP", 260, 36, 14, 17)
GUICtrlCreateLabel("Название сетевого подключения:", 260, 84, 176, 17)
$inNetworkConnectionName = GUICtrlCreateInput("inNetworkConnectionName", 260, 100, 437, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Mask:", 404, 36, 33, 17)
GUICtrlCreateLabel("Шлюз: ", 556, 36, 39, 17)
$inGateway = GUICtrlCreateInput("inGateway", 596, 32, 101, 21, -1, $WS_EX_CLIENTEDGE)
$inDNS1_1 = GUICtrlCreateInput("inDNS1_1", 300, 56, 97, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("DNS2", 404, 60, 33, 17)
$inDNS1_2 = GUICtrlCreateInput("inDNS1_2", 440, 56, 109, 21, -1, $WS_EX_CLIENTEDGE)
$cbDHCP = GUICtrlCreateCheckbox("DHCP On", 560, 56, 129, 21)
$cbDNSDHCP = GUICtrlCreateCheckbox("DNS DHCP On", 560, 76, 97, 21)
GUICtrlCreateLabel("DNS1", 260, 60, 33, 17)
$inMask = GUICtrlCreateInput("inMask", 440, 32, 109, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateTabItem("")
$Tab1 = GUICtrlCreateTab(16, 136, 309, 233)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites



I'm not seeing your problem please explain a bit more, below shows items in both tabs

#include <GUIConstants.au3>
; == GUI generated with Koda ==
$Morda = GUICreate("?????????", 705, 814, 185, 127)
$Group1 = GUICtrlCreateGroup("?????????????", 8, 8, 241, 93)
GUICtrlCreateLabel("???", 16, 28, 26, 17)
$inComputerName = GUICtrlCreateInput("NAME", 44, 24, 201, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("?????", 12, 52, 39, 17)
$inDomain = GUICtrlCreateInput("inDomain", 56, 48, 189, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("??????? ??????", 12, 76, 83, 17)
$inWorkgroup = GUICtrlCreateInput("inWorkgroup", 96, 72, 149, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$IP1 = GUICtrlCreateTab(256, 8, 445, 121)
$TabSheet1 = GUICtrlCreateTabItem("IP1")
$inIP = GUICtrlCreateInput("IP1", 300, 32, 97, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("IP", 260, 36, 14, 17)
GUICtrlCreateLabel("???????? ???????? ???????????:", 260, 84, 176, 17)
$inNetworkConnectionName = GUICtrlCreateInput("inNetworkConnectionName", 260, 100, 437, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("Mask:", 404, 36, 33, 17)
GUICtrlCreateLabel("????: ", 556, 36, 39, 17)
$inGateway = GUICtrlCreateInput("inGateway", 596, 32, 101, 21, -1, $WS_EX_CLIENTEDGE)
$inDNS1_1 = GUICtrlCreateInput("inDNS1_1", 300, 56, 97, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateLabel("DNS2", 404, 60, 33, 17)
$inDNS1_2 = GUICtrlCreateInput("inDNS1_2", 440, 56, 109, 21, -1, $WS_EX_CLIENTEDGE)
$cbDHCP = GUICtrlCreateCheckbox("DHCP On", 560, 56, 129, 21)
$cbDNSDHCP = GUICtrlCreateCheckbox("DNS DHCP On", 560, 76, 97, 21)
GUICtrlCreateLabel("DNS1", 260, 60, 33, 17)
$inMask = GUICtrlCreateInput("inMask", 440, 32, 109, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateTabItem("")

;$Tab1 = GUICtrlCreateTab(16, 136, 309, 233)
$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")
$inMask = GUICtrlCreateInput("inMask", 440, 32, 109, 21, -1, $WS_EX_CLIENTEDGE)
GUICtrlCreateTabItem("")

GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
   ;;;;;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")

It must create TabItem in SECOND TAB CONTROL with name $Tab1, isn't it?

I want to create TWO DIFFERENT Tab CONTROLS in FORM! With Different TabItems.

Edited by Dirk Diggler

Share this post


Link to post
Share on other sites

$TabSheet2 = GUICtrlCreateTabItem("TabSheet2")

It must create TabItem in SECOND TAB CONTROL with name $Tab1, isn't it?

I want to create TWO DIFFERENT Tab CONTROLS in FORM! With Different TabItems.

No need to shout.

Still don't see what your on about?

#include <GuiConstants.au3>
$dlgTabbed = GUICreate("Tabs", 412, 297, 302, 218)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
$TabSheet1 = GUICtrlCreateTabItem("3")
GUICtrlCreateLabel("Tab 1", 168, 104, 61, 17)
$TabSheet2 = GUICtrlCreateTabItem("different")
GUICtrlCreateLabel("Tab 2", 176, 136, 61, 17)
$TabSheet3 = GUICtrlCreateTabItem("Tabs")
GUICtrlCreateLabel("Tab 3", 184, 128, 61, 17)
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites

or do you mean this?

#include <GuiConstants.au3>
$dlgTabbed = GUICreate("Tabs", 412, 600, 302, 218)
GUISetIcon("D:\005.ico")
$PageControl1 = GUICtrlCreateTab(8, 8, 396, 256)
$TabSheet1 = GUICtrlCreateTabItem("3")
GUICtrlCreateLabel("Tab 1", 168, 104, 61, 17)
$TabSheet2 = GUICtrlCreateTabItem("different")
GUICtrlCreateLabel("Tab 2", 176, 136, 61, 17)
$TabSheet3 = GUICtrlCreateTabItem("Tabs")
GUICtrlCreateLabel("Tab 3", 184, 128, 61, 17)
GUICtrlCreateTabItem("")
;GuiCtrlSetState(-1,$GUI_Disable)

$Sub=GUICreate("", 412, 300,0,268,$WS_CHILD,-1,$dlgTabbed)
$PageControl2 = GUICtrlCreateTab(8, 8, 396, 256)
$TabSheet4 = GUICtrlCreateTabItem("3 more")
GUICtrlCreateLabel("Tab 4", 168, 104, 61, 17)
$TabSheet5 = GUICtrlCreateTabItem("different")
GUICtrlCreateLabel("Tab 5", 176, 136, 61, 17)
$TabSheet6 = GUICtrlCreateTabItem("Tabs")
GUICtrlCreateLabel("Tab 6", 184, 128, 61, 17)
GUICtrlCreateTabItem("")


GUISetState(@SW_SHOW,$dlgTabbed)
GUISetState(@SW_SHOW,$Sub)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;;;;;
    EndSelect
WEnd
Exit

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Yes! I mean this. What is a secret of creation second tab? :P

Why it's need to use GUICreate("".....?

Why this don't used in KodaFormDesigner?

When I makin Form, i can see 2 Tab Controls. When i generete code and start it, there is only one Tab Control

Edited by Dirk Diggler

Share this post


Link to post
Share on other sites

Yes! I mean this. What is a secret of creation second tab? :P

Why it's need to use GUICreate("".....?

Why this don't used in KodaFormDesigner?

When I makin Form, i can see 2 Tab Controls. When i generete code and start it, there is only one Tab Control

Couldn't tell you why, but if you dont put the second tab on in a child gui window within the first then more tab items just get added to the first tab box.

However using my example you should be able to do what you need to do, you just need to code it by hand

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