Jump to content

issue with tabs in gui


Recommended Posts

well, i have some code here... and i just added tabs to it.

if im on the "install" tab.. the code seems to be working fine.

i fill out the fields and click "add set to list"

and it does what i want.

but then i click on the "play" tab and i can see one of the labels BLEEDING through to that tab. also... when i am on the "play" tab i can fill out the fields on the "install" tab by just pressing keys.

is there a better way to "seperate" this code? so that i dont have these side effects?

#include <GUIConstants.au3>
#include <File.au3>

Global $set
Global $clearcount
Global $savelist
Global $saved
Global $readkeys
Global $count
Global $crap

$GUI = GUICreate("in the working...", 560, 440)

GUICtrlCreateTab(0, 0, 560, 440)

GUICtrlCreateTabItem("INSTALL")
GUICtrlCreateLabel("Installer!", 250, 40)

$count = 0
$set = 0
$a = 0
$b = 0
$c = 0
$d = 0
$e = 0
$f = 0
$g = 0
$h = 0
$spacer = "."
$savelist = ""
$saved = ""

GUICtrlCreateLabel("REGULAR", 10, 235, 120, 20)
GUICtrlCreateLabel("HERE:", 10, 250, 120, 15)

$d1 = GUICtrlCreateInput("", 140, 240, 30, 20)
$d2 = GUICtrlCreateInput("", 175, 240, 30, 20)
$d3 = GUICtrlCreateInput("", 210, 240, 30, 20)
$d4 = GUICtrlCreateInput("", 245, 240, 30, 20)

$x1 = GUICtrlCreateInput("", 140, 280, 30, 20)
$x2 = GUICtrlCreateInput("", 175, 280, 30, 20)
$x3 = GUICtrlCreateInput("", 210, 280, 30, 20)
$x4 = GUICtrlCreateInput("", 245, 280, 30, 20)

GUICtrlSetLimit($d1, 4)
GUICtrlSetLimit($d2, 4)
GUICtrlSetLimit($d3, 4)
GUICtrlSetLimit($d4, 4)
GUICtrlSetLimit($x1, 4)
GUICtrlSetLimit($x2, 4)
GUICtrlSetLimit($x3, 4)
GUICtrlSetLimit($x4, 4)

GUICtrlCreateLabel("EXPANSION", 10, 275, 120, 20)
GUICtrlCreateLabel("HERE:", 10, 290, 120, 15)
GUICtrlCreateLabel("LOADED:", 333, 235, 120, 15)
GUICtrlCreateLabel($set, 460, 235, 13, 15)
$add = GUICtrlCreateButton("Add Set To List", 165, 315, 85)
$mylist = GUICtrlCreateList("", 333, 270, 200, 130, BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $WS_TABSTOP))

GUICtrlSetLimit(-1, 200)

$clear = GUICtrlCreateButton("Clear Last Set", 333, 400, 75)
GUICtrlSetState($clear, $GUI_DISABLE)
$install = GUICtrlCreateButton("Install Keys", 464, 400, 70)
GUICtrlSetState($install, $GUI_DISABLE)
GUICtrlSetState($mylist, $GUI_DISABLE)
GUICtrlSetState($x1, $GUI_DISABLE)
GUICtrlSetState($x2, $GUI_DISABLE)
GUICtrlSetState($x3, $GUI_DISABLE)
GUICtrlSetState($x4, $GUI_DISABLE)

GUICtrlCreateTabItem("PLAY")
GUICtrlCreateLabel("lala land", 250, 40)

GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
   $msg = GUIGetMsg()
   
   If $crap = 0 Then
      GUICtrlSetState($clear, $GUI_DISABLE)
      $crap = 1
   EndIf
   
   Select
      Case $msg = $add
         GUICtrlSetState($d1, $GUI_ENABLE)
         GUICtrlSetState($d2, $GUI_ENABLE)
         GUICtrlSetState($d3, $GUI_ENABLE)
         GUICtrlSetState($d4, $GUI_ENABLE)
         GUICtrlSetState($mylist, $GUI_ENABLE)
         $i = GUICtrlRead ($d1)
         $j = GUICtrlRead ($d2)
         $k = GUICtrlRead ($d3)
         $l = GUICtrlRead ($d4)
         $m = GUICtrlRead ($x1)
         $n = GUICtrlRead ($x2)
         $o = GUICtrlRead ($x3)
         $p = GUICtrlRead ($x4)
         $set = $set + 1
         GUICtrlCreateLabel($set, 460, 235, 13, 15)
         $keysets = ("               SET " & $set & ":" & @CRLF & _
               "RG KEY: " & $i & "-" & $j & "-" & $k & "-" & $l & @CRLF & _
               "EX KEY: " & $m & "-" & $n & "-" & $o & "-" & $p & @CRLF & $spacer & @CRLF)
         
         $spacer = $spacer & " "
         $keystext = FileOpen("keys.txt", 1)
         
         FileWrite($keystext, $keysets)
         FileClose($keystext)
         
         $readkeys = FileOpen("keys.txt", 0)
         $clearcount = 0
         While 1
            $line = FileReadLine($readkeys)
            If @error = -1 Then ExitLoop
            $clearcount = $clearcount + 1
         Wend
         
         FileClose($readkeys)
         
         $a = 0
         $b = 0
         $c = 0
         $d = 0
         $e = 0
         $f = 0
         $g = 0
         $h = 0
         
         GUICtrlSetData($mylist, "               SET " & $set & ":")
         GUICtrlSetData($mylist, "RG KEY: " & $i & "-" & $j & "-" & $k & "-" & $l)
         GUICtrlSetData($mylist, "EX KEY: " & $m & "-" & $n & "-" & $o & "-" & $p)
         GUICtrlSetData($mylist, $spacer)
         
         GUICtrlSetData($d1, "")
         GUICtrlSetData($d2, "")
         GUICtrlSetData($d3, "")
         GUICtrlSetData($d4, "")
         GUICtrlSetData($x1, "")
         GUICtrlSetData($x2, "")
         GUICtrlSetData($x3, "")
         GUICtrlSetData($x4, "")
         
         $msg = 0
         
         GUICtrlSetState($clear, $GUI_ENABLE)
         GUICtrlSetState($install, $GUI_ENABLE)
         GUICtrlSetState($d1, $GUI_FOCUS)
         
      Case $msg = $clear
         $clearcount = $clearcount - 4
         $line = 0
         $set = $set - 1
         GUICtrlCreateLabel($set, 460, 235, 13, 15)
         GUICtrlSetData($mylist, "")
         $keystext = FileOpen("keys.txt", 0)
         Do
            $line = $line + 1
            $keysline = (FileReadLine("keys.txt", $line))
            If $clearcount = 0 Then
               $line = 0
               $keysline = ""
            EndIf
            GUICtrlSetData($mylist, $keysline)
            
         Until $line = $clearcount
         $crap = $set
         GUICtrlSetState($d1, $GUI_FOCUS)
         FileClose($keystext)
         
         If $set = 0 Then
            GUICtrlSetState($install, $GUI_DISABLE)
         EndIf
         
      Case $msg = $install
         MsgBox(0, "", "the closing button has been clicked", 2)
         Exit
   EndSelect
   
   
   $var1 = StringLen(GuiCtrlRead ($d1))
   $var2 = StringLen(GuiCtrlRead ($d2))
   $var3 = StringLen(GuiCtrlRead ($d3))
   $var4 = StringLen(GuiCtrlRead ($d4))
   $var5 = StringLen(GuiCtrlRead ($x1))
   $var6 = StringLen(GuiCtrlRead ($x2))
   $var7 = StringLen(GuiCtrlRead ($x3))
   $var8 = StringLen(GuiCtrlRead ($x4))
   
   If $var1 = 4 And $var2 = 4 And $var3 = 4 And $var4 = 4 _
         And $var5 = 4 And $var6 = 4 And $var7 = 4 And $var8 = 4 And Not ControlCommand($GUI, "", $add, "IsEnabled", "") Then
      GUICtrlSetState($add, $GUI_ENABLE)
      
   ElseIf $var1 <> 4 And $var2 <> 4 And $var3 <> 4 And $var4 <> 4 And $var5 <> 4 And _
         $var6 <> 4 And $var7 <> 4 And $var8 <> 4 And ControlCommand($GUI, "", $add, "IsEnabled", "") Then
      GUICtrlSetState($add, $GUI_DISABLE)
   EndIf
   

   If $var1 = 0 And $set = 0 Then
      GUICtrlSetState($d1, $GUI_FOCUS)
   EndIf
   
   If $var1 = 4 And $a = 0 Then 
      GUICtrlSetState($d2, $GUI_FOCUS)
      $a = 1
   EndIf
   
   If $var2 = 4 And $b = 0 Then
      GUICtrlSetState($d3, $GUI_FOCUS)
      $b = 1
   EndIf
   
   If $var3 = 4 And $c = 0 Then
      GUICtrlSetState($d4, $GUI_FOCUS)
      $c = 1
   EndIf
   
   If $var4 = 4 And $d = 0 Then
      GUICtrlSetState($x1, $GUI_ENABLE)
      GUICtrlSetState($x2, $GUI_ENABLE)
      GUICtrlSetState($x3, $GUI_ENABLE)
      GUICtrlSetState($x4, $GUI_ENABLE)
      GUICtrlSetState($d1, $GUI_DISABLE)
      GUICtrlSetState($d2, $GUI_DISABLE)
      GUICtrlSetState($d3, $GUI_DISABLE)
      GUICtrlSetState($d4, $GUI_DISABLE)
      GUICtrlSetState($x1, $GUI_FOCUS)
      $d = 1
   EndIf
   
   If $var5 = 4 And $e = 0 Then
      GUICtrlSetState($x2, $GUI_FOCUS)
      $e = 1
   EndIf
   
   If $var6 = 4 And $f = 0 Then
      GUICtrlSetState($x3, $GUI_FOCUS)
      $f = 1
   EndIf
   
   If $var7 = 4 And $g = 0 Then
      
      GUICtrlSetState($x4, $GUI_FOCUS)
      $g = 1
   EndIf
   
   If $var8 = 4 And $h = 0 Then
      GUICtrlSetState($x1, $GUI_DISABLE)
      GUICtrlSetState($x2, $GUI_DISABLE)
      GUICtrlSetState($x3, $GUI_DISABLE)
      GUICtrlSetState($x4, $GUI_DISABLE)
      GUICtrlSetState($add, $GUI_FOCUS)
      $h = 1
   EndIf

Wend

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

Suggest that you try this with the latest beta as a problem related to control bleed-through on tabs was addressed in the 3.1.1.39 release.

I was not able to reproduce with 3.1.1.40, but I'm not certain I was testing what you were doing -- the "Add Set to List" button was disabled and although I saw taht you had logic to enable it, I wasn't interested in digesting all of your code to figure it out.

If the latest beta does not resolve the issue, please consider posting a smaller piece of code that demonstrates the issue.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

well, i compiled with the beta autoit-v3.1.1.41

and now it still bleeds through, AND... the numbers "stack" on top of each other.

i included the whole code, because i thought if you ran it, then you could "see" what im talking about.

but, if you want an example, here.

#include <GUIConstants.au3>
$set = 0

$GUI = GUICreate("in the working...", 560, 440)

GUICtrlCreateTab(0, 0, 560, 440)

GUICtrlCreateTabItem("INSTALL")
GUICtrlCreateLabel("Installer!", 250, 40)


$add = GUICtrlCreateButton("Add Set To List", 165, 315, 85)




GUICtrlCreateTabItem("PLAY")
GUICtrlCreateLabel("lala land", 250, 40)

GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
   $msg = GUIGetMsg()
   Select
      Case $msg = $add

         $set = $set + 1
         GUICtrlCreateLabel($set, 460, 235, 13, 15)

  

   EndSelect

Wend

EDIT: they dont seem to be stacking on this example, but on the full code they do.

but they are still bleeding through. also.. just filling out the fields will enable the "add set to list" button

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

i included the whole code, because i thought if you ran it, then you could "see" what im talking about.

EDIT: they dont seem to be stacking on this example, but on the full code they do.

but they are still bleeding through.  also.. just filling out the fields will enable the "add set to list" button

<{POST_SNAPBACK}>

Sorry, as I said, I tried your example but didn't see the problem. I filled in the fields, but the button did not become enabled.

In any case the shortened example helped. I saw the stacking numbers and I think what you really want is this:

#include <GUIConstants.au3>
$set = 0

$GUI = GUICreate("in the working...", 560, 440)

GUICtrlCreateTab(0, 0, 560, 440)

GUICtrlCreateTabItem("INSTALL")
GUICtrlCreateLabel("Installer!", 250, 40)


$add = GUICtrlCreateButton("Add Set To List", 165, 315, 85)

GUICtrlCreateTabItem("PLAY")
GUICtrlCreateLabel("lala land", 250, 40)
$label = GUICtrlCreateLabel($set, 460, 235, 13, 15)

GUICtrlCreateTabitem ("")  ; end tabitem definition

GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
   $msg = GUIGetMsg()
   Select
      Case $msg = $add
        $set = $set + 1
        GuiCtrlSetData($label, $set)
   EndSelect
Wend

First, you want to include the GUICtrlCreateTabitem ("")

Next, you need to define your label right after the tab definition, capture the controlID and then update it with GUICtrlSetData instead of continuing to define new labels at the same position (that was causing the stacking) over and over again.

Hope this helps.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

ok. ill play with that, but you need to fill in all 8 fields, then the button should be enabled heh.

EDIT: using guictrlsetdata instead of recreating the label solved everything

olmost everything.. if the focus is on a field of input.. and you switch to the second tab

then type something... and switch back to the first tab

you will see the text you typed in the input fields.

this should only really happen if you are on that tab.

but the big problem is solved at least heh..

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

Link to comment
Share on other sites

wow, tabs make things complicated!

my code will add to the list when you fill out the fields and click the "add set to list" button

but, now.. i decide to put a background picture on the gui

and just putting that pic on, makes the button NOT add to the list when clicked.

i know its a big bit of code, but its frustrating! lol

use any .jpg pic for the example

also, if this is easily fixed... would it be possible to add a different background picture for EACH TAB?

#include <GUIConstants.au3>
#include <File.au3>

Global $set
Global $clearcount
Global $savelist
Global $saved
Global $readkeys
Global $count
Global $crap

$GUI = GUICreate("in the working...", 560, 440)
$background = GUICtrlCreatePic ("test.jpg",0,23,560,440)

GUICtrlCreateTab(0, 0, 560, 440)

GUICtrlCreateTabItem("INSTALL")
GUICtrlCreateLabel("Installer!", 250, 40)

$count = 0
$set = 0
$a = 0
$b = 0
$c = 0
$d = 0
$e = 0
$f = 0
$g = 0
$h = 0
$spacer = "."
$savelist = ""
$saved = ""

GUICtrlCreateLabel("REGULAR", 10, 235, 120, 20)
GUICtrlCreateLabel("HERE:", 10, 250, 120, 15)

$d1 = GUICtrlCreateInput("", 140, 240, 30, 20)
$d2 = GUICtrlCreateInput("", 175, 240, 30, 20)
$d3 = GUICtrlCreateInput("", 210, 240, 30, 20)
$d4 = GUICtrlCreateInput("", 245, 240, 30, 20)

$x1 = GUICtrlCreateInput("", 140, 280, 30, 20)
$x2 = GUICtrlCreateInput("", 175, 280, 30, 20)
$x3 = GUICtrlCreateInput("", 210, 280, 30, 20)
$x4 = GUICtrlCreateInput("", 245, 280, 30, 20)

GUICtrlSetLimit($d1, 4)
GUICtrlSetLimit($d2, 4)
GUICtrlSetLimit($d3, 4)
GUICtrlSetLimit($d4, 4)
GUICtrlSetLimit($x1, 4)
GUICtrlSetLimit($x2, 4)
GUICtrlSetLimit($x3, 4)
GUICtrlSetLimit($x4, 4)

GUICtrlCreateLabel("EXPANSION", 10, 275, 120, 20)
GUICtrlCreateLabel("HERE:", 10, 290, 120, 15)
GUICtrlCreateLabel("LOADED:", 333, 235, 120, 15)
GUICtrlCreateLabel($set, 460, 235, 13, 15)
$add = GUICtrlCreateButton("Add Set To List", 165, 315, 85)
$mylist = GUICtrlCreateList("", 333, 270, 200, 130, BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $WS_TABSTOP))

GUICtrlSetLimit(-1, 200)

$clear = GUICtrlCreateButton("Clear Last Set", 333, 400, 75)
GUICtrlSetState($clear, $GUI_DISABLE)
$install = GUICtrlCreateButton("Install Keys", 464, 400, 70)
GUICtrlSetState($install, $GUI_DISABLE)
GUICtrlSetState($mylist, $GUI_DISABLE)
GUICtrlSetState($x1, $GUI_DISABLE)
GUICtrlSetState($x2, $GUI_DISABLE)
GUICtrlSetState($x3, $GUI_DISABLE)
GUICtrlSetState($x4, $GUI_DISABLE)

GUICtrlCreateTabItem("PLAY")
GUICtrlCreateLabel("lala land", 250, 40)

GUISetState()

$msg = 0
While $msg <> $GUI_EVENT_CLOSE
   $msg = GUIGetMsg()
   
   If $crap = 0 Then
      GUICtrlSetState($clear, $GUI_DISABLE)
      $crap = 1
   EndIf
   
   Select
      Case $msg = $add
         GUICtrlSetState($d1, $GUI_ENABLE)
         GUICtrlSetState($d2, $GUI_ENABLE)
         GUICtrlSetState($d3, $GUI_ENABLE)
         GUICtrlSetState($d4, $GUI_ENABLE)
         GUICtrlSetState($mylist, $GUI_ENABLE)
         $i = GUICtrlRead ($d1)
         $j = GUICtrlRead ($d2)
         $k = GUICtrlRead ($d3)
         $l = GUICtrlRead ($d4)
         $m = GUICtrlRead ($x1)
         $n = GUICtrlRead ($x2)
         $o = GUICtrlRead ($x3)
         $p = GUICtrlRead ($x4)
         $set = $set + 1
         GUICtrlCreateLabel($set, 460, 235, 13, 15)
         $keysets = ("               SET " & $set & ":" & @CRLF & _
               "RG KEY: " & $i & "-" & $j & "-" & $k & "-" & $l & @CRLF & _
               "EX KEY: " & $m & "-" & $n & "-" & $o & "-" & $p & @CRLF & $spacer & @CRLF)
         
         $spacer = $spacer & " "
         $keystext = FileOpen("keys.txt", 1)
         
         FileWrite($keystext, $keysets)
         FileClose($keystext)
         
         $readkeys = FileOpen("keys.txt", 0)
         $clearcount = 0
         While 1
            $line = FileReadLine($readkeys)
            If @error = -1 Then ExitLoop
            $clearcount = $clearcount + 1
         Wend
         
         FileClose($readkeys)
         
         $a = 0
         $b = 0
         $c = 0
         $d = 0
         $e = 0
         $f = 0
         $g = 0
         $h = 0
         
         GUICtrlSetData($mylist, "               SET " & $set & ":")
         GUICtrlSetData($mylist, "RG KEY: " & $i & "-" & $j & "-" & $k & "-" & $l)
         GUICtrlSetData($mylist, "EX KEY: " & $m & "-" & $n & "-" & $o & "-" & $p)
         GUICtrlSetData($mylist, $spacer)
         
         GUICtrlSetData($d1, "")
         GUICtrlSetData($d2, "")
         GUICtrlSetData($d3, "")
         GUICtrlSetData($d4, "")
         GUICtrlSetData($x1, "")
         GUICtrlSetData($x2, "")
         GUICtrlSetData($x3, "")
         GUICtrlSetData($x4, "")
         
         $msg = 0
         
         GUICtrlSetState($clear, $GUI_ENABLE)
         GUICtrlSetState($install, $GUI_ENABLE)
         GUICtrlSetState($d1, $GUI_FOCUS)
         
      Case $msg = $clear
         $clearcount = $clearcount - 4
         $line = 0
         $set = $set - 1
         GUICtrlCreateLabel($set, 460, 235, 13, 15)
         GUICtrlSetData($mylist, "")
         $keystext = FileOpen("keys.txt", 0)
         Do
            $line = $line + 1
            $keysline = (FileReadLine("keys.txt", $line))
            If $clearcount = 0 Then
               $line = 0
               $keysline = ""
            EndIf
            GUICtrlSetData($mylist, $keysline)
            
         Until $line = $clearcount
         $crap = $set
         GUICtrlSetState($d1, $GUI_FOCUS)
         FileClose($keystext)
         
         If $set = 0 Then
            GUICtrlSetState($install, $GUI_DISABLE)
         EndIf
         
      Case $msg = $install
         MsgBox(0, "", "the closing button has been clicked", 2)
         Exit
   EndSelect
   
   
   $var1 = StringLen(GuiCtrlRead ($d1))
   $var2 = StringLen(GuiCtrlRead ($d2))
   $var3 = StringLen(GuiCtrlRead ($d3))
   $var4 = StringLen(GuiCtrlRead ($d4))
   $var5 = StringLen(GuiCtrlRead ($x1))
   $var6 = StringLen(GuiCtrlRead ($x2))
   $var7 = StringLen(GuiCtrlRead ($x3))
   $var8 = StringLen(GuiCtrlRead ($x4))
   
   If $var1 = 4 And $var2 = 4 And $var3 = 4 And $var4 = 4 _
         And $var5 = 4 And $var6 = 4 And $var7 = 4 And $var8 = 4 And Not ControlCommand($GUI, "", $add, "IsEnabled", "") Then
      GUICtrlSetState($add, $GUI_ENABLE)
      
   ElseIf $var1 <> 4 And $var2 <> 4 And $var3 <> 4 And $var4 <> 4 And $var5 <> 4 And _
         $var6 <> 4 And $var7 <> 4 And $var8 <> 4 And ControlCommand($GUI, "", $add, "IsEnabled", "") Then
      GUICtrlSetState($add, $GUI_DISABLE)
   EndIf
   

   If $var1 = 0 And $set = 0 Then
      GUICtrlSetState($d1, $GUI_FOCUS)
   EndIf
   
   If $var1 = 4 And $a = 0 Then 
      GUICtrlSetState($d2, $GUI_FOCUS)
      $a = 1
   EndIf
   
   If $var2 = 4 And $b = 0 Then
      GUICtrlSetState($d3, $GUI_FOCUS)
      $b = 1
   EndIf
   
   If $var3 = 4 And $c = 0 Then
      GUICtrlSetState($d4, $GUI_FOCUS)
      $c = 1
   EndIf
   
   If $var4 = 4 And $d = 0 Then
      GUICtrlSetState($x1, $GUI_ENABLE)
      GUICtrlSetState($x2, $GUI_ENABLE)
      GUICtrlSetState($x3, $GUI_ENABLE)
      GUICtrlSetState($x4, $GUI_ENABLE)
      GUICtrlSetState($d1, $GUI_DISABLE)
      GUICtrlSetState($d2, $GUI_DISABLE)
      GUICtrlSetState($d3, $GUI_DISABLE)
      GUICtrlSetState($d4, $GUI_DISABLE)
      GUICtrlSetState($x1, $GUI_FOCUS)
      $d = 1
   EndIf
   
   If $var5 = 4 And $e = 0 Then
      GUICtrlSetState($x2, $GUI_FOCUS)
      $e = 1
   EndIf
   
   If $var6 = 4 And $f = 0 Then
      GUICtrlSetState($x3, $GUI_FOCUS)
      $f = 1
   EndIf
   
   If $var7 = 4 And $g = 0 Then
      
      GUICtrlSetState($x4, $GUI_FOCUS)
      $g = 1
   EndIf
   
   If $var8 = 4 And $h = 0 Then
      GUICtrlSetState($x1, $GUI_DISABLE)
      GUICtrlSetState($x2, $GUI_DISABLE)
      GUICtrlSetState($x3, $GUI_DISABLE)
      GUICtrlSetState($x4, $GUI_DISABLE)
      GUICtrlSetState($add, $GUI_FOCUS)
      $h = 1
   EndIf

Wend

upon further testing, i found that you can add to the list using the spacebar.. when the button is focused.

or you can use any button thats focused.. by hitting the spacebar.

clicking these buttons does nothing

also, when you add a background picture.. the old problem comes back.

and you can once again see the label in the second tab

maybe i should just not try to make it look nice... functionality is more important.

but this thing is pretty ugly

so i dont know.... if i can get this to work, great. if not, o well

Edited by t0ddie

Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you.

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...