Default Posted October 15, 2008 Posted October 15, 2008 Hi,My program uses a fixedwidth tab style and an icon on each tab, but the text on the last tab, no matter how many tabs, doesn't appear in the right place.So, my question is, how do I use the fixedwidth style and get all my text to display properly?#include <GUIConstantsEx.au3> #include <GuiTab.au3> GUICreate("Title", 500, 120,-1, -1 ) GUICtrlCreateTab(0, 0, 500, 120, $TCS_FORCELABELLEFT + $TCS_FIXEDWIDTH) For $i = 0 To 3 GUICtrlCreateTabItem("unobscured") GUICtrlSetImage ( -1, "shell32.dll" , 4) Next GUISetState () While 1 Sleep (100) WEnd
martin Posted October 15, 2008 Posted October 15, 2008 Hi, My program uses a fixedwidth tab style and an icon on each tab, but the text on the last tab, no matter how many tabs, doesn't appear in the right place. So, my question is, how do I use the fixedwidth style and get all my text to display properly? #include <GUIConstantsEx.au3> #include <GuiTab.au3> GUICreate("Title", 500, 120,-1, -1 ) GUICtrlCreateTab(0, 0, 500, 120, $TCS_FORCELABELLEFT + $TCS_FIXEDWIDTH) For $i = 0 To 3 GUICtrlCreateTabItem("unobscured") GUICtrlSetImage ( -1, "shell32.dll" , 4) Next GUISetState () While 1 Sleep (100) WEndThis is probably not the correct way, but setting the tab size seems to work. #include <GUIConstantsEx.au3> #include <GuiTab.au3> GUICreate("Title", 500, 120,-1, -1 ) $Tab1 = GUICtrlCreateTab(0, 0, 500, 120, $TCS_FORCELABELLEFT + $TCS_FIXEDWIDTH) For $i = 0 To 3 GUICtrlCreateTabItem("unobscured") GUICtrlSetImage ( -1, "shell32.dll" , 4) Next GUISetState () GuictrlSendMsg($Tab1, $TCM_SETITEMSIZE, 0, _MakeLong(120, 20));set tab width to just a bit less than 1/4 of tab control width. While 1 Sleep (100) WEnd Func _MakeLong($l, $h) Return BitOR(BitAnd($l, 0xFFFF), BitShift(BitAnd($h, 0xFFFF), -16)) EndFunc; _MakeLong() 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.
Default Posted October 15, 2008 Author Posted October 15, 2008 Thank you! Correct way or not, it works perfectly.
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