Jump to content

Recommended Posts

Posted

I don't know how to start this project and was wondering if anybody can lean a hand.

 

On my GUI, I have the following items:

+ button = button to add textbox

Textbox 1 = Username

Save button

 

So what I want is every time when I click the (+) button, it shift the save button farther down to make spaces to adds a textbox 2 below textbox 1. In addition, it will also add a (-) button next to Textbox 2 etc. If I click - button next to textbox 2, it will delete the textbox 2 and shift any items below up including the GUI resizing to correct free spaces. Any help is much appreciated.

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")
Posted (edited)
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <EditConstants.au3>

$testadd = GUICreate("testadd",185,122,-1,-1,-1,-1)
$inputUsername = GUICtrlCreateInput("",17,47,156,26,-1,$WS_EX_CLIENTEDGE)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$bplus = GUICtrlCreateButton("+",17,6,100,30,-1,-1)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$bcancel = GUICtrlCreateButton("Cancel",17,80,100,30,-1,-1)
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
GUISetState(@SW_SHOW,$testadd)
    
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $bplus
            Shifter()
        EndSwitch
WEnd

 

I haven't started doing the code as I'm not sure where to begin. Especially if it adds the new textbox, I'm not sure how I'm going to assign a variables to it as well.

 

 

EDIT: Nevermind, I created multiple fields and hide them. Using a button to show them works just fine.

Edited by Queener

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...