Jump to content
Sign in to follow this  
dina

Creating tab and controls

Recommended Posts

dina

Hello,

How to create a tab and add controls like textbox, checkbox, buttons inside the tab..

Regards,

dina

Share this post


Link to post
Share on other sites
TehWhale

GUICtrlCreateTab()

GUICtrlCreateCheckBox()

What's so hard about it?

Share this post


Link to post
Share on other sites
dina

I just got confused with the _GuiCtrlTab_Create()

Is both the same?

Share this post


Link to post
Share on other sites
TehWhale

It all works out the same except for ones internal, and ones external.

They are pretty much the same, but I perfer usign the GUICtrlCreateTab().

Share this post


Link to post
Share on other sites
dina

Thanks for the information! But I dont understand what you mean by internal and external... could you pls explain..

Share this post


Link to post
Share on other sites
Cha0sBG

try this way

#include <GuiConstants.au3>

$ME = GUICreate("My Example", 200, 200)
GUICtrlCreateTab(0, 0, 200, 200)
$Tab1 = GUICtrlCreateTabItem("Tab1")
GUICtrlCreateCheckbox("Example Checkbox", 20 , 50)
GUISetState(@SW_SHOW)
$Tab2 = GUICtrlCreateTabItem("Tab2")
GUICtrlCreateButton("Example :)", 10, 33)
GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        Exit
        EndIf
    WEnd

this is just a simple example muttley

Edited by Cha0sBG

Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Share this post


Link to post
Share on other sites
rasim

Cha0sBG

Don't forget to close your tabitem creation with GUICtrlCreateTabItem("") Posted Image

#include <GuiConstants.au3>

$ME = GUICreate("My Example", 200, 200)

GUICtrlCreateTab(0, 0, 200, 200)

$Tab1 = GUICtrlCreateTabItem("Tab1")
GUICtrlCreateCheckbox("Example Checkbox", 20 , 50)

$Tab2 = GUICtrlCreateTabItem("Tab2")
GUICtrlCreateButton("Example :)", 10, 33)
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        Exit
    EndIf
WEnd

Share this post


Link to post
Share on other sites
Cha0sBG

Cha0sBG

Don't forget to close your tabitem creation with GUICtrlCreateTabItem("") Posted Image

#include <GuiConstants.au3>

$ME = GUICreate("My Example", 200, 200)

GUICtrlCreateTab(0, 0, 200, 200)

$Tab1 = GUICtrlCreateTabItem("Tab1")
GUICtrlCreateCheckbox("Example Checkbox", 20 , 50)

$Tab2 = GUICtrlCreateTabItem("Tab2")
GUICtrlCreateButton("Example :) ", 10, 33)
GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)

While 1
    $Msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        Exit
    EndIf
WEnd

umm whoops muttley i forgot :)


Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread.

Share this post


Link to post
Share on other sites
Achilles

I just got confused with the _GuiCtrlTab_Create()

Is both the same?

I think (not too sure really) you can exchange the handles fairly easily (e.g. create a tab with GuiCtrlCreateTab and then use a _GuiCtrlTrab_InsertItem). The _GUICtrlTab_* functions have a lot more options so if your doing anything complicated go with them.

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.