Jump to content

Guictrlread and TabItems


Orca
 Share

Recommended Posts

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 by SiC_Goat

I AM ORCA!! A VERY POWERFUL WHALE!!!

Link to comment
Share on other sites

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

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
 Share

  • Recently Browsing   0 members

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