Sign in to follow this  
Followers 0
Madza91

SetItemText... bug in example script or what?

9 posts in this topic

#1 ·  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) :)

Share this post


Link to post
Share on other sites



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) :)

Share this post


Link to post
Share on other sites

I fixed this...

Just follow this easy steps :( :

Open Include GuiTab.au3

Find line 1116

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

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

That's it ;D

Ok, this has to be reported in the Bug TRAC... :mellow:

Share this post


Link to post
Share on other sites

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) :)

Share this post


Link to post
Share on other sites

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) :)

Share this post


Link to post
Share on other sites

Reported. Apparently, the error coming from: _GUICtrlTab_SetItem().

Ticket closed already fixed in beta.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0