Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

GUICtrlCreateTabitem


  • Please log in to reply
32 replies to this topic

#21 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 29 January 2008 - 09:31 AM

did you try to compile it? it'll give you VAR error when running the exe

Edited by star2, 29 January 2008 - 09:31 AM.

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT







#22 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 29 January 2008 - 09:36 AM

Compiled, works just fine !

#23 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 29 January 2008 - 09:38 AM

upload the error message and compiled script, and I will check !

#24 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 29 January 2008 - 09:56 AM

this is when you run the script file, and when running the exe file

Attached Thumbnails

  • 001.jpg
  • 002.jpg

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT

#25 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 29 January 2008 - 10:07 AM

My script, in au3 and exe version, in attached zip-file

#26 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 29 January 2008 - 10:25 AM

the exe is ok but still the same in the au3 let me check what the problem after a few hours cause I have a meeting now

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT

#27 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 29 January 2008 - 10:30 AM

I'm sorry I forgot that I have installed the Beta version I compiled the file with the 3.2.10 compiler and it's ok
but as for the Beta version it's not !! this is note for developers.

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT

#28 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 29 January 2008 - 10:39 AM

Then it works as it should, except for the problem with the label disappearing, I think it is a AutoIT bug, do you think I should write a bug report ?

#29 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 29 January 2008 - 10:50 AM

I guess so ! (not sure, cause I didn't fully check it fully yet)

Edited by star2, 29 January 2008 - 10:51 AM.

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT

#30 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 29 January 2008 - 04:54 PM

Please learn about the z-order. By constantly deleting and re-creating the control, it was always below the tab control. The label must be created before the tab control. The code is modified to create the label - once - above the tab control. It is then updated and unimaginatively enough it works fine. I also fixed the constant declaration problem. You must include the files correctly. 3.2.10.0 is pretty lazy about #include and pulls in tons of things it shouldn't (GuiTab was likely including StaticConstants.au3 directly or indirectly). Many of those issues are fixed so scripts that once worked may not work because you are missing an #include that was previously indirectly being #included for you.
Plain Text         
#include <GuiConstantsEx.au3> #include <GuiTab.au3> Global $ColorTab, $TabItem, $go, $msg $main = GUICreate ("Test", 400,300) GUISetBkColor (0) $ColorTab = GUICtrlCreateLabel("", 0, 0, 1, 1, BitOR($SS_NOTIFY, $SS_CENTER, $SS_SUNKEN)) $TabItem = GUICtrlCreateTab(5, 5,390, 260) GUICtrlCreateTabItem ("Tab item - 1") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 2") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 3") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 4") GUICtrlCreateTabItem ("") $go = GUICtrlCreateButton ("test", 5, 270, 390,25) _GUICtrlTab_SetCurSel(GUICtrlGetHandle($TabItem),0) _GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),0) TabEvent() GUISetState () While 1     $msg = GUIGetMsg ()     If $msg = $gui_event_close Then ExitLoop     if $msg = $TabItem Then TabEvent()     if $msg = $go Then Tab1() WEnd Func TabEvent()     Local $l_tab, $l_tabX, $l_tabY, $l_margin, $l_coord, $l_text   ; $test = IniRead ("test.ini", "Selected", "Tab item selected" , 0)        $l_tabX = 5     $l_tabY = 5     $l_margin = 1     $l_tab = _GUICtrlTab_GetCurSel(GUICtrlGetHandle($TabItem))     $l_coord = _GUICtrlTab_GetItemRect(GUICtrlGetHandle($TabItem), $l_tab); Get coordinates of TabItem     $l_text = _GUICtrlTab_GetItemText(GUICtrlGetHandle($TabItem), $l_tab); Get text of TabItem    ;If $test <> $l_tab  Then         GUICtrlSetPos($ColorTab, $l_tabX + $l_coord[0] + $l_margin, $l_tabY + $l_coord[1] + $l_margin, $l_coord[2] - $l_coord[0] - ($l_margin * 2), $l_coord[3] - $l_coord[1] - ($l_margin * 2))         GUICtrlSetData($ColorTab, $l_text)         GUICtrlsetBkColor ($ColorTab,0xFFFFC0 ); set the color of the label     ;   IniWrite ("test.ini", "Selected", "Tab item selected", $l_tab)      ;  $test = $l_tab    ;EndIf     _GUICtrlTab_SetCurFocus(GUICtrlGetHandle($TabItem),$l_tab) EndFunc Func Tab1()     If $msg = $go Then         MsgBox (0, "", _GUICtrlTab_GetItemState ($main,0))     EndIf EndFunc

Edit: Removed function trace statements from the code.

Edited by Valik, 29 January 2008 - 04:54 PM.


#31 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 30 January 2008 - 07:15 AM

Please learn about the z-order. By constantly deleting and re-creating the control, it was always below the tab control. The label must be created before the tab control. The code is modified to create the label - once - above the tab control.


as usual I feel like a dumb, thank you Valik for the help.

Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT

#32 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 30 January 2008 - 07:35 AM

Thank you, now I have a little bit more knowledge about thet, but the code below

GUICtrlCreateTabItem ("Tab item - 1") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 2") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 3") GUICtrlCreateTabItem ("") GUICtrlCreateTabItem ("Tab item - 4") GUICtrlCreateTabItem ("")


should be

GUICtrlCreateTabItem ("Tab item - 1") GUICtrlCreateTabItem ("Tab item - 2") GUICtrlCreateTabItem ("Tab item - 3") GUICtrlCreateTabItem ("Tab item - 4") GUICtrlCreateTabItem ("")


or am I wrong ? - The code submitted by me was as the second example.

#33 star2

star2

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 461 posts

Posted 30 January 2008 - 10:32 AM

This is the right one (the one you made)

GUICtrlCreateTabItem ("Tab item - 1") GUICtrlCreateTabItem ("Tab item - 2") GUICtrlCreateTabItem ("Tab item - 3") GUICtrlCreateTabItem ("Tab item - 4") GUICtrlCreateTabItem ("")


Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams

.............................................................................AUTOIT




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users