Jump to content

Recommended Posts

Posted

I have a Tab control with 2 tabs and I want the 2 tabs to fill the entire width of the tab control.

My interpretation of the help file it says to use:

$TCS_RIGHTJUSTIFY+TCS_MULTILINE

Description For TCS_RIGHTJUSTIFY:

The width of each tab is increased, if necessary, so that each row of tabs fills the entire width of the tab control.

This window style is ignored unless the TCS_MULTILINE style is also specified.

I must be missing something here because it does not work the tabs remain the same size.

Posted

I tried this once. It wasn't terribly easy. If I remember, I had to manually send messages to the tab control to set the height/width of each tab control myself. I don't remember what message that was off the top of my head, though.

Posted

Couldn't you just pad the tabitem titles with spaces?

GuiCreate("Example")
GuiCtrlCreateTab(10, 10, 200, 200)
GuiCtrlcReateTabItem("           One          ")
GuiCtrlcReateTabItem("           Two          ")

GuiSetState()
While guiGetMsg() <> -3
WEnd
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted (edited)

Getting closer: But I can only change the height....

EDIT: Added the FIXEDWIDTH style

Global $TCS_FIXEDWIDTH = 0x400
Global $TCM_FIRST = 0x1300;
Global $TCM_SETITEMSIZE = ($TCM_FIRST + 41);

GuiCreate("Example")
   $tab = GuiCtrlCreateTab(10, 10, 204, 200, $TCS_FIXEDWIDTH)
   GuiCtrlCreateTabItem("One")
   GuiCtrlCreateTabItem("Two")
   GuiSendMsg($tab, $TCM_SETITEMSIZE, 0, _MakeLong(100, 40));(width, height)
GuiSetState()

While guiGetMsg() <> -3
WEnd

; From Valik's post 
; http://www.autoitscript.com/forum/index.php?act=ST&f=7&t=5620&hl=&view=findpost&p=37511
Func _MakeLong($l, $h)
   Return BitOR(BitAnd($l, 0xFFFF), BitShift(BitAnd($h, 0xFFFF), -16))
EndFunc; _MakeLong()
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

CS, I think there is a minimum size but no maximum. Trying setting some absurdly large height and see if the size increases. I could be wrong, though, I don't fully remember what all I tested.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...