Jump to content

Recommended Posts

Posted (edited)

Hello, i found this script in examples and it's bugged, new TabText should be "New Text", but when start script it give me tab with "New T" text...

why?!

Is that bug in example script or in _GUICtrlTab_SetItemText function ?!

#include <GuiConstantsEx.au3>
#include <GuiTab.au3>

Opt('MustDeclareVars', 1)

$Debug_TAB = False ; Check ClassName being passed to functions, set to True and use a handle to another control to see it work

_Main()

Func _Main()
    Local $hTab
    GUICreate("Tab Control Set Item Text", 400, 300)
    $hTab = GUICtrlCreateTab(2, 2, 396, 296)
    GUISetState()
    _GUICtrlTab_InsertItem($hTab, 0, "Tab 1")
    _GUICtrlTab_InsertItem($hTab, 1, "Tab 2")
    _GUICtrlTab_InsertItem($hTab, 2, "Tab 3")
    _GUICtrlTab_SetItemText($hTab, 0, "New Text")
    MsgBox(4160, "Information", "Tab 1 text: " & _GUICtrlTab_GetItemText($hTab, 0))
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main
Edited by n3nE

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Posted

I fixed this...

Just follow this easy steps :mellow: :

Open Include GuiTab.au3

Find line 1116

Replace: $iBuffer = StringLen($sText) + 1

With: $iBuffer = StringLen($sText)*2 + 1

That's it ;D

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Posted

Please report it, I have some stuff to do :mellow:

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

Posted

I fixed it, did you see it ? ^^

[quote name='dbzfanatic' post='609696' date='Nov 26 2008, 08:46 AM']This is a help forum not a "write this for me" forum.[/quote](Sorry for bad English) :)

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
×
×
  • Create New...