bshoenhair 0 Posted November 20, 2004 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. Share this post Link to post Share on other sites
Valik 478 Posted November 20, 2004 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. Share this post Link to post Share on other sites
CyberSlug 6 Posted November 20, 2004 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! Share this post Link to post Share on other sites
CyberSlug 6 Posted November 20, 2004 (edited) Getting closer: But I can only change the height....EDIT: Added the FIXEDWIDTH styleGlobal $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 November 20, 2004 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! Share this post Link to post Share on other sites
Valik 478 Posted November 20, 2004 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. Share this post Link to post Share on other sites
CyberSlug 6 Posted November 20, 2004 Oops, I meant to say "only change height." I cannot change the width using the GuiSendMsg method.... Maybe there is a certain style I'd need to apply to the tab control? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Share this post Link to post Share on other sites
Valik 478 Posted November 20, 2004 Maybe TCS_FIXEDWIDTH? Share this post Link to post Share on other sites
CyberSlug 6 Posted November 20, 2004 Maybe TCS_FIXEDWIDTH?<{POST_SNAPBACK}>That's it $TCS_FIXEDWIDTH = 0x400$tab = GuiCtrlCreateTab(10, 10, 200, 200, $TCS_FIXEDWIDTH);....GuiSendMsg($tab, $TCM_SETITEMSIZE, 0, _MakeLong($width, $height));.... Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Share this post Link to post Share on other sites
bshoenhair 0 Posted November 20, 2004 Great, got it to work, thanks for the help Share this post Link to post Share on other sites