Orca Posted February 8, 2008 Share Posted February 8, 2008 (edited) I'm trying to get the text of a tabitem that does not have a reference field to it. There is, however, a reference to the overarching Tab ConsoleWrite ( GuiCtrlRead ( GuiCtrlRead ( $Tabs, 1 ) ) ) The inner read gets the ControlID for the currently active tabitem. The second one should read from that tabitem. Unfortunately this returns a black string for both normal and advance reads. Any other suggestions? Further the code GuiCreate ( "" ) GuiCtrlCreateTab ( 0, 0 ) $a = GuiCtrlCreateTabItem ( "asdf" ) ConsoleWrite ( "[" ) ConsoleWrite ( GuiCtrlRead ( $a ) ) ConsoleWrite ( "]" ) Prints out "[]". So either this is a bug on the GuiCtrlRead'ing of TabItems or there is another approach to this (that isn't completely convoluted) Edited February 8, 2008 by SiC_Goat I AM ORCA!! A VERY POWERFUL WHALE!!! Link to comment Share on other sites More sharing options...
rasim Posted February 8, 2008 Share Posted February 8, 2008 I'm trying to get the text of a tabitem that does not have a reference field to it. There is, however, a reference to the overarching Tab ConsoleWrite ( GuiCtrlRead ( GuiCtrlRead ( $Tabs, 1 ) ) ) The inner read gets the ControlID for the currently active tabitem. The second one should read from that tabitem. Unfortunately this returns a black string for both normal and advance reads. Any other suggestions? Further the code GuiCreate ( "" ) GuiCtrlCreateTab ( 0, 0 ) $a = GuiCtrlCreateTabItem ( "asdf" ) ConsoleWrite ( "[" ) ConsoleWrite ( GuiCtrlRead ( $a ) ) ConsoleWrite ( "]" ) Prints out "[]". So either this is a bug on the GuiCtrlRead'ing of TabItems or there is another approach to this (that isn't completely convoluted) Hi! #include <GuiConstants.au3> #include <GuiTab.au3> $hGui = GUICreate("Test GUI", 300, 200) $Tab = GuiCtrlCreateTab ( 0, 0 ) $a = GuiCtrlCreateTabItem ( "asdf" ) $a = GuiCtrlCreateTabItem ( "" ) ConsoleWrite(_GUICtrlTab_GetItemText($Tab, 0)) GUISetState() Do Until GUIGetMsg() = -3 Link to comment Share on other sites More sharing options...
Orca Posted February 8, 2008 Author Share Posted February 8, 2008 Clearly I should be opening the help file with teh UDFs in it thanks a ton! I AM ORCA!! A VERY POWERFUL WHALE!!! 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