Jump to content

Weird, added 3 input fields to a working GUI


Gene
 Share

Recommended Posts

This is on a Tab. All the code on the Tab works as expected, except the 2nd and 3rd fields from the end. I can enter data in any of the 3, I can tab to any of the 3, I can mouse click in the last field, but not in the 2 before it. In the first 2 and last field I can get an I-beam cursor and click the insertion point into those fields, but the 2 next to last only show an arrow cursor. The problem all ready existed before I changed the colors. The kicker is, I copied the 2nd field, made it shorter, then copied it twice more to create the last 3 fields.

All the code on the Tab is in the snippet below.

Suggestions are appreciated.

$SaveNewActBtn = GUICtrlCreateButton("Save Activity", 280, 270, 89, 25)
 GUICtrlSetFont($SaveNewActBtn, $iFontSize, $iFontWt, 0, $sFontFace)
 $Label7 = GUICtrlCreateLabel("New activities are added to the Current", 280, 232, 300, 25, $SS_CENTERIMAGE)
 $Label7a = GUICtrlCreateLabel("Name displayed in the upper left corner.", 280, 247, 300, 25, $SS_CENTERIMAGE)
 GUICtrlSetFont($Label7, $iFontSize, $iFontWt, 0, $sFontFace)
 $NewActivity = GUICtrlCreateInput("", 389, 270, 145, 25)
 GUICtrlSetFont($NewActivity, $iFontSize, $iFontWt, 0, $sFontFace)
 GUICtrlSetTip(-1, "Enter a new activity?")
 
 $Label7b = GUICtrlCreateLabel("Set time for", 280, 300, 300, 25, $SS_CENTERIMAGE) 
 $Label7c = GUICtrlCreateLabel("this activity.", 280, 315, 300, 25, $SS_CENTERIMAGE) 
 
;$Label7d = GUICtrlCreateLabel("Min:", 365, 307, 25, 25, $SS_CENTERIMAGE) 
 $MinTime = GUICtrlCreateInput("", 395, 307, 45, 25)
 GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
 GUICtrlSetColor(-1, 0xFF0000)
 GUICtrlSetBkColor(-1, 0x00FF00)
 GUICtrlSetTip(-1, "Minimum Time")
 
;$Label7e = GUICtrlCreateLabel("Max:", 451, 307, 26, 25, $SS_CENTERIMAGE) 
 $MaxTime = GUICtrlCreateInput("", 481, 307, 45, 25)
 GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
 GUICtrlSetColor(-1, 0xFFFF00)
 GUICtrlSetBkColor(-1, 0xFF0000)
 GUICtrlSetTip(-1, "Warning Time")
 
;$Label7f = GUICtrlCreateLabel("Warn:", 523, 307, 34, 25, $SS_CENTERIMAGE) 
 $WarnTime = GUICtrlCreateInput("", 560, 307, 45, 25)
 GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
 GUICtrlSetColor(-1, 0xFF0000)
 GUICtrlSetBkColor(-1, 0xFFFF00)
 GUICtrlSetTip(-1, "Maximum Time")

Gene :lmao:

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

its the labels... this works

#include <GuiConstants.au3>

GUICreate("", 650, 500)

$SaveNewActBtn = GUICtrlCreateButton("Save Activity", 280, 270, 89, 25)
;GUICtrlSetFont($SaveNewActBtn, $iFontSize, $iFontWt, 0, $sFontFace)
$Label7 = GUICtrlCreateLabel("New activities are added to the Current", 280, 232, 300, 25, $SS_CENTERIMAGE)
$Label7a = GUICtrlCreateLabel("Name displayed in the upper left corner.", 280, 247, 300, 25, $SS_CENTERIMAGE)
;GUICtrlSetFont($Label7, $iFontSize, $iFontWt, 0, $sFontFace)
$NewActivity = GUICtrlCreateInput("", 389, 270, 145, 25)
;GUICtrlSetFont($NewActivity, $iFontSize, $iFontWt, 0, $sFontFace)
GUICtrlSetTip(-1, "Enter a new activity?")

;$Label7b = GUICtrlCreateLabel("Set time for", 280, 300, 300, 25, $SS_CENTERIMAGE)
;$Label7c = GUICtrlCreateLabel("this activity.", 280, 315, 300, 25, $SS_CENTERIMAGE)

;$Label7d = GUICtrlCreateLabel("Min:", 365, 307, 25, 25, $SS_CENTERIMAGE)
$MinTime = GUICtrlCreateInput("", 395, 307, 45, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0x00FF00)
GUICtrlSetTip(-1, "Minimum Time")

;$Label7e = GUICtrlCreateLabel("Max:", 451, 307, 26, 25, $SS_CENTERIMAGE)
$MaxTime = GUICtrlCreateInput("", 481, 307, 45, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFFFF00)
GUICtrlSetBkColor(-1, 0xFF0000)
GUICtrlSetTip(-1, "Warning Time")

;$Label7f = GUICtrlCreateLabel("Warn:", 523, 307, 34, 25, $SS_CENTERIMAGE)
$WarnTime = GUICtrlCreateInput("", 560, 307, 45, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetBkColor(-1, 0xFFFF00)
GUICtrlSetTip(-1, "Maximum Time")

GUISetState()

While 1
    
    
    
    sleep(20)
WEnd

8)

NEWHeader1.png

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