Jump to content

Inputbox


Recommended Posts

Hi,

I've a problem with the input boxes in my lil script...

If i create them befor i create the background they are in the background -> logic

but if creat them after, they wont work....

$sicalc = GUICreate("SI-Calc", 801, 301, 154, 171)
$Label4 = GUICtrlCreateLabel("Roheisen", 640, 168, 49, 17)
$Label5 = GUICtrlCreateLabel("Kurs", 24, 224, 42, 28)
GUICtrlSetFont(-1, 15, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("Spice", 640, 24, 31, 17)
$Label3 = GUICtrlCreateLabel("Metall", 640, 120, 32, 17)
$Label2 = GUICtrlCreateLabel("Kryptonit", 640, 72, 45, 17)
$RH1 = GUICtrlCreateInput("", 24, 40, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$M1 = GUICtrlCreateInput("", 176, 40, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$K1 = GUICtrlCreateInput("", 328, 40, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$RH2 = GUICtrlCreateInput("", 24, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$M2 = GUICtrlCreateInput("", 176, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$K2 = GUICtrlCreateInput("", 328, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$S2 = GUICtrlCreateInput("", 481, 88, 119, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$K3 = GUICtrlCreateInput("", 328, 136, 121, 21)
$S1 = GUICtrlCreateInput("", 480, 40, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$S3 = GUICtrlCreateInput("", 480, 136, 121, 21)
$M4 = GUICtrlCreateInput("", 176, 184, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$K4 = GUICtrlCreateInput("", 328, 184, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$S4 = GUICtrlCreateInput("", 480, 184, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$RH3 = GUICtrlCreateInput("", 24, 136, 121, 21)
$M3 = GUICtrlCreateInput("", 176, 136, 121, 21)
$RH4 = GUICtrlCreateInput("", 24, 184, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$RESULTS = GUICtrlCreateInput("", 640, 40, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY,$ES_NUMBER))
$RESULTK = GUICtrlCreateInput("", 640, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY,$ES_NUMBER))
$RESULTM = GUICtrlCreateInput("", 640, 136, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY))
$RESULTR = GUICtrlCreateInput("", 640, 184, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_READONLY,$ES_NUMBER))
$KURSR = GUICtrlCreateInput("6", 24, 248, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$KURSM = GUICtrlCreateInput("2,5", 176, 248, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$KURSK = GUICtrlCreateInput("3", 328, 248, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$STARTCALC = GUICtrlCreateButton("Calculate", 664, 240, 75, 25)
$KURSS = GUICtrlCreateInput("1", 480, 248, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_NUMBER))
$Pic1 = GUICtrlCreatePic(@ScriptDir & "\Background\si_calc_bg.jpg", 0, 0, 796, 300)
$Pic5 = GUICtrlCreatePic(@ScriptDir & "\Rohstoffe\spice.gif", 528, 8, 30, 24)
$Pic4 = GUICtrlCreatePic(@ScriptDir & "\Rohstoffe\kryptonit.gif", 368, 8, 30, 24)
$Pic3 = GUICtrlCreatePic(@ScriptDir & "\Rohstoffe\metal.gif", 224, 8, 30, 24)
$Pic2 = GUICtrlCreatePic(@ScriptDir & "\Rohstoffe\roheisen.gif", 64, 8, 30, 24)
Link to comment
Share on other sites

From the help file for GUICtrlCreatePic.

If a picture is set as a background picture, as the other controls will overlap, it's important to disable the pic control and create it after the others controls: GuiCtrlSetState(-1,$GUI_DISABLE). This is not enough for Tab or Listview control which behave differently. In this case you need to create the picture with the $WS_CLIPSIBLINGS style, GuiCtrlSetState(-1,$GUI_ONTOP) is necessary for the Tab, TreeView or Listview control.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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