Sign in to follow this  
Followers 0
zaini

How to do Tab like this..

7 posts in this topic

I like this tab..

but i dont know how to create tab like this..

can anybody help me...??

Posted Image


Share this post


Link to post
Share on other sites



All the functions you need are in the Help file under User Defined Functions >> GUI Tab Management


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

erm..but the icon size and height of tab not change..

i dont know how to do it..

can you give me an example..??


Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

erm..but the icon size and height of tab not change..

i dont know how to do it..

can you give me an example..??

If your tab id is $tab1 then send a message like this

GuictrlSendMsg($Tab1, $TCM_SETITEMSIZE, 0, _MakeLong(323, 20))make the tabs 300 wide and 20 high


Func _MakeLong($l, $h)
    Return BitOR(BitAnd($l, 0xFFFF), BitShift(BitAnd($h, 0xFFFF), -16))
EndFunc; _MakeLong()

EDIT: The tab must have the style $TCS_FIXEDWIDTH for this to work.

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.

Share this post


Link to post
Share on other sites

Thanx its work for the width and height... :)

how to set icon on tab with size 32?


Share this post


Link to post
Share on other sites

zaini

Just set a icon size and extract the large icon:

#include <GuiConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiTab.au3>

$hGUI = GUICreate("Test", 300, 200)

$cTab = GUICtrlCreateTab(10, 10, 280, 180)

$hImage = _GUIImageList_Create(32, 32, 5, 3)
_GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 13, True)
_GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 14, True)
_GUIImageList_AddIcon($hImage, @SystemDir & "\shell32.dll", 15, True)

_GUICtrlTab_SetImageList($cTab, $hImage)

_GUICtrlTab_InsertItem($cTab, 0, "Item 1", 0)
_GUICtrlTab_InsertItem($cTab, 1, "Item 2", 1)
_GUICtrlTab_InsertItem($cTab, 2, "Item 3", 2)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

:)

Share this post


Link to post
Share on other sites

Thank you very much Rasim..

You answering my questions...

i appreciate it so much.. :)


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