Jump to content

InputBox - This should be easy !!!


Recommended Posts

I am struggling to figure this issue out and although it is not that important it is bothering me.

I have a GUI with two input boxes where the user enters an identifier and their name but the input boxes appear with as the same color as the background (grey) with a slight outline. I would like the boxes to be white as soon as the GUI loads. The boxes only turn white when the mouse is run over them. Is there a way to fix this? I have looked through the forum and help files to no avail.

Attached is a screen shot of the boxes.

this is the code for the boxes.

GUICtrlCreateLabel("Please Enter the Client's Identifier and Your Name.", 20, 2, 300, 20)

     $clientname = GUICtrlCreateInput("", 140, 30, 150, 20, 0, 0x00000300)
     GUICtrlCreateLabel("Enter Client Identifier: ", 20, 33, 300, 15)

     $enduser = GUICtrlCreateInput("", 140, 55, 150, 20, 0, 0x00000300)
     GUICtrlCreateLabel("Enter Your Name: ", 20, 58, 300, 15)

post-57388-12714363777206_thumb.png

Link to comment
Share on other sites

Your labels have very large widths, and they are overflowing on to your input controls. 100 instead of 300 works well:

$g = GUICreate("GUI")
GUICtrlCreateLabel("Please Enter the Client's Identifier and Your Name.", 20, 2, 300, 20)

     $clientname = GUICtrlCreateInput("", 140, 30, 150, 20, 0, 0x00000300)
     GUICtrlCreateLabel("Enter Client Identifier: ", 20, 33, 100, 15)

     $enduser = GUICtrlCreateInput("", 140, 55, 150, 20, 0, 0x00000300)
     GUICtrlCreateLabel("Enter Your Name: ", 20, 58, 100, 15)
GUISetState()
while 1
    Sleep(100)
WEnd
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...