bshoenhair Posted November 20, 2004 Share 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. Link to comment Share on other sites More sharing options...
Valik Posted November 20, 2004 Share 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted November 20, 2004 Share 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! Link to comment Share on other sites More sharing options...
CyberSlug Posted November 20, 2004 Share 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! Link to comment Share on other sites More sharing options...
Valik Posted November 20, 2004 Share 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. Link to comment Share on other sites More sharing options...
CyberSlug Posted November 20, 2004 Share 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! Link to comment Share on other sites More sharing options...
Valik Posted November 20, 2004 Share Posted November 20, 2004 Maybe TCS_FIXEDWIDTH? Link to comment Share on other sites More sharing options...
CyberSlug Posted November 20, 2004 Share 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! Link to comment Share on other sites More sharing options...
bshoenhair Posted November 20, 2004 Author Share Posted November 20, 2004 Great, got it to work, thanks for the help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now