Sign in to follow this  
Followers 0
Daniel W.

Guictrledit Doesn't Edit The Labels Right...

3 posts in this topic

#1 ·  Posted (edited)

Here is my code first:

#include <GUIConstants.au3>

GUICreate("Config Manager", 700, 220)

$bind = GUICtrlCreateLabel("Bind", 10, 13)
$input1 = GUICtrlCreateInput("", 50, 10, 100)
$input2 = GUICtrlCreateInput("", 160, 10, 430)
$save = GUICtrlCreateButton("Save", 595, 8, 100)
$label = GUICtrlCreateLabel("", 5, 40, 688, 175, $SS_SUNKEN)
$label1 = GUICtrlCreateLabel( "", 10, 45)
$label2 = GUICtrlCreateLabel( "", 52, 45)
$label3 = GUICtrlCreateLabel( "", 162, 45)
$label4 = GUICtrlCreateLabel( "", 10, 65)
$label5 = GUICtrlCreateLabel( "", 52, 65)
$label6 = GUICtrlCreateLabel( "", 162, 65)
$label7 = GUICtrlCreateLabel( "", 10, 85)
$label8 = GUICtrlCreateLabel( "", 52, 85)
$label9 = GUICtrlCreateLabel( "", 162, 85)
$label10 = GUICtrlCreateLabel( "", 10, 105)
$label11 = GUICtrlCreateLabel( "", 52, 105)
$label12 = GUICtrlCreateLabel( "", 162, 105)
$label13 = GUICtrlCreateLabel( "", 10, 125)
$label14 = GUICtrlCreateLabel( "", 52, 125)
$label15 = GUICtrlCreateLabel( "", 162, 125)
$label16 = GUICtrlCreateLabel( "", 10, 145)
$label17 = GUICtrlCreateLabel( "", 52, 145)
$label18 = GUICtrlCreateLabel( "", 162, 145)
$label16 = GUICtrlCreateLabel( "", 10, 165)
$label17 = GUICtrlCreateLabel( "", 52, 165)
$label18 = GUICtrlCreateLabel( "", 162, 165)
$label19 = GUICtrlCreateLabel( "", 10, 185)
$label20 = GUICtrlCreateLabel( "", 52, 185)
$label21 = GUICtrlCreateLabel( "", 162, 185)

GUISetState()
While 1
    $msg = GUIGetMsg()
    $labelread1 = GUICtrlRead( $label1 )
    $labelread4 = GUICtrlRead($label4)
    $labelread7 = GUICtrlRead($label7)
    $labelread10 = GUICtrlRead($label10)
    $labelread13 = GUICtrlRead($label13)
    $labelread16 = GUICtrlRead($label16)
    $labelread19 = GUICtrlRead($label19)
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $save
            $inputread1 = GUICtrlRead( $input1 )
            $inputread2 = GUICtrlRead( $input2 )
            If $labelread1 = "" Then
                GUICtrlSetData( $label1 , "Bind")
                GUICtrlSetData( $label2 , $inputread1)
                GUICtrlSetData( $label3 , $inputread2)
                Else 
                    If $labelread4 = "" Then
                        GUICtrlSetData( $label4 , "Bind")
                        GUICtrlSetData( $label5 , $inputread1)
                        GUICtrlSetData( $label6 , $inputread2)
                    Else
                        If $labelread7 = "" Then
                            GUICtrlSetData( $label7 , "Bind")
                            GUICtrlSetData( $label8 , $inputread1)
                            GUICtrlSetData( $label9 , $inputread2)
                        Else
                            If $labelread10 = "" Then
                                GUICtrlSetData( $label10 , "Bind")
                                GUICtrlSetData( $label11 , $inputread1)
                                GUICtrlSetData( $label12 , $inputread2)
                            Else
                                If $labelread13 = "" Then
                                    GUICtrlSetData( $label13 , "Bind")
                                    GUICtrlSetData( $label14 , $inputread1)
                                    GUICtrlSetData( $label15 , $inputread2)
                                Else
                                    If $labelread16 = "" Then
                                        GUICtrlSetData( $label16 , "Bind")
                                        GUICtrlSetData( $label17 , $inputread1)
                                        GUICtrlSetData( $label18 , $inputread2)
                                    Else
                                        If $labelread19 = "" Then
                                            GUICtrlSetData( $label19 , "Bind")
                                            GUICtrlSetData( $label20 , $inputread1)
                                            GUICtrlSetData( $label21 , $inputread2)
                                        EndIf
                                    EndIf
                                EndIf
                            EndIf
                        EndIf
                    EndIf
                EndIf
    EndSelect
WEnd

Now when i klick on the Save Button it only puts in the first 2 letters from both inputs and not everything.

Edited by Daniel W.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites



$label1 = GUICtrlCreateLabel( "", 10, 45, 40, 20)

$label2 = GUICtrlCreateLabel( "", 52, 45, 340, 20)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Thanks that works but i got another problem he doesn't write anything in Line 6. He jumps from line 5 to line 7 ...


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

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