Jump to content

Mouse click in text box


Recommended Posts

Hi, recently i created a GUI for some calculations in AutoIT.  The GUI has 2 tabs and on the first tab, it has few inputboxes where i use to click with mouse and start entering the inputs. i recently made some changes in the position of these textboxes. I made this by changing the autoit code file instead of making changes in KODA. Now i cannot click inside these textboxes with mouse. However, i can use TAB key to cycle through/enter input in these input boxes. what could have made the inputboxes not responding to mouseclicks. thanks

Link to comment
Share on other sites

  • Moderators

@Rskm how about posting the code so we can see what you're seeing, rather than asking us to guess?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

10 hours ago, JLogan3o13 said:

@Rskm how about posting the code so we can see what you're seeing, rather than asking us to guess?

Hi, The code is here.. so when i run this, on the Tab 1, there is a text box 'location of the ....' i am not able to click in this with the mouse now.  But if i use Tab on keyboard, i can enter the input. i am not sure why mouse clicks are not accepted now.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\Users\RajithRadhakrishnan\Downloads\untitled_JPA_icon.ico
#Tidy_Parameters=/sdp ?C:\Program Files\gnuplot\bin\gnuplot.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <file.au3>
#include <string.au3>
#include <WinAPIFiles.au3>
#include <StringConstants.au3>
#include <date.au3>
#include <Math.au3>
#include <Excel.au3>
#include <ExcelConstants.au3>
#include <Color.au3>
#include <MsgBoxConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=d:\my_autoitscripts\cribbing\cribbing_check\gui2\gui_cribbing.kxf
Global $Form1_1 = GUICreate("Cribbing Program", 344, 900, -1, -1)
Global $MAIN = GUICtrlCreateTab(0, 0, 344, 895)
;
Global $TabSheet1 = GUICtrlCreateTabItem("Cribbing_Coord")
;
Global $Label3 = GUICtrlCreateLabel("This section of the program extracts coordinates for the proposed cribbing pattern", 16, 40,300,200)
Global $Labe33 = GUICtrlCreateLabel("1. Input 1", 16, 80,300,200)
Global $Labe34 = GUICtrlCreateLabel("2. Input 2", 16, 120,300,200)
Global $Labe34 = GUICtrlCreateLabel("3. Input 3", 16, 185,300,200)
Global $Labe35 = GUICtrlCreateLabel("4. Instructions", 16, 250,300,200)

;
Global $Label1 = GUICtrlCreateLabel("Location for the .DXF file/ Coord file  :", 16, 320, 265, 22)
Global $kod_locn = GUICtrlCreateInput(" ", 16, 340, 280, 26)
;
Global $Label23 = GUICtrlCreateLabel("Name of the .DXF file :", 16, 370, 165, 22)
;~
Global $kod_dwf_name = GUICtrlCreateInput(".DXF", 16, 390, 280, 26)
;
Global $Label2 = GUICtrlCreateLabel("Thickness of the cribbing (m) :", 16, 420, 165, 22)
Global $kod_cribthk = GUICtrlCreateInput("0.3", 16, 440, 281, 26)
Global $Button1 = GUICtrlCreateButton("Extract from DXF", 16, 470, 105, 35)
Global $Button11 = GUICtrlCreateButton("Template File", 16, 520, 105, 35)
;
;
;
Global $TabSheet2 = GUICtrlCreateTabItem("Analysis")
GUICtrlSetState(-1,$GUI_SHOW)
Global $Label7 = GUICtrlCreateLabel("This section calculates the stresses in the proposed cribbing. ", 8, 32, 300, 17)
Global $Group1 = GUICtrlCreateGroup("Jack-Up/HLV  Data", 8, 80, 321, 193)
Global $Label4 = GUICtrlCreateLabel("Mass of the Jack-Up (Te):", 16, 128, 190, 25)
Global $kod_jh = GUICtrlCreateInput("Jack Up, HLV", 208, 104, 121, 21)
Global $Label5 = GUICtrlCreateLabel("CofG of the Jack-Up in X (m):", 16, 152, 142, 17)
Global $kod_mass = GUICtrlCreateInput("", 208, 128, 121, 21)
Global $Label6 = GUICtrlCreateLabel("CofG of the Jack-Up in Y (m):", 16, 176, 142, 17)
Global $kod_cogx = GUICtrlCreateInput("", 208, 152, 121, 21)
Global $Label9 = GUICtrlCreateLabel("CofG of the Jack-Up in Z (m):", 16, 200, 142, 17)
Global $kod_cogy = GUICtrlCreateInput("", 208, 176, 121, 21)
Global $Label10 = GUICtrlCreateLabel("Name of Jack-Up, HLV name:", 16, 104, 142, 21)
Global $kod_cogz = GUICtrlCreateInput("", 208, 200, 121, 21)
Global $Label11 = GUICtrlCreateLabel("Mass MomInertia in Pitching(Te.m2):", 16, 224,190, 17)
Global $kod_pinertia = GUICtrlCreateInput("", 208, 224, 121, 21)
Global $Label12 = GUICtrlCreateLabel("Mass MomInertia in Rolling(Te.m2):", 16, 248,190, 17)
Global $kod_rinertia = GUICtrlCreateInput("", 208, 248, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)

Global $Label8 = GUICtrlCreateLabel("X,Y are respectively Longitudinal,Transverse axis for the Carrier vessel", 8, 56, 300, 17)
Global $Group2 = GUICtrlCreateGroup("Motions (Pitching)", 8, 280, 321, 121)
Global $Label13 = GUICtrlCreateLabel("Surge Acceleration (m/s2) :", 16, 304, 133, 17)
Global $Label14 = GUICtrlCreateLabel("Pitch Acceleration (Deg/s2) :", 16, 328, 190, 17)
Global $Label15 = GUICtrlCreateLabel("Pitch Angle (Deg) :", 16, 352, 93, 17)
Global $Label16 = GUICtrlCreateLabel("Heave Acceleration (m/s2)", 16, 376, 131, 17)
Global $kod_surge = GUICtrlCreateInput("", 208, 304, 121, 21)
Global $kod_pitch_accln = GUICtrlCreateInput("", 208, 328, 121, 21)
Global $kod_pitch_angle = GUICtrlCreateInput("", 208, 352, 121, 21)
Global $kod_p_heave = GUICtrlCreateInput("", 208, 376, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Motions = GUICtrlCreateGroup("Motions (Rolling)", 8, 408, 321, 121)
Global $kod = GUICtrlCreateLabel("Sway Acceleration (m/s2) :", 16, 432, 131, 17)
Global $Label17 = GUICtrlCreateLabel("Roll Acceleration (Deg/s2) :", 16, 456, 190, 17)
Global $Label18 = GUICtrlCreateLabel("Roll Angle (Deg) :", 16, 480, 87, 17)
Global $Label19 = GUICtrlCreateLabel("Heave Acceleration (m/s2) :", 16, 504, 137, 17)
Global $kod_sway = GUICtrlCreateInput("", 208, 432, 121, 21)
Global $kod_roll_accln = GUICtrlCreateInput("", 208, 456, 121, 21)
Global $kod_roll_angle = GUICtrlCreateInput("", 208, 480, 121, 21)
Global $kod_r_heave = GUICtrlCreateInput("", 208, 504, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Group3 = GUICtrlCreateGroup("Wind Data (1 Hr )", 8, 536, 321, 169)
Global $Label20 = GUICtrlCreateLabel("Wind force along Longi, Fx (kN) :", 16, 560, 190, 17)
Global $Label21 = GUICtrlCreateLabel("CoE above the cribbing for Fx (m)  :", 16, 584, 190, 17)
Global $Label22 = GUICtrlCreateLabel("Wind force along Transverse, Fy (kN) :", 16, 608, 190, 17)
Global $Label23 = GUICtrlCreateLabel("CoE above the cribbing for Fy (m) :", 16, 632,190, 17)
Global $Label24 = GUICtrlCreateLabel("Trim, about Transverse axis (Deg) :", 16, 656, 166, 17)
Global $Label25 = GUICtrlCreateLabel("Heel, about Longitudinal axis (Deg) :", 16, 680, 172, 17)
Global $kod_wind_fx = GUICtrlCreateInput("", 208, 560, 121, 21)
Global $kod_coe_x = GUICtrlCreateInput("", 208, 584, 121, 21)
Global $kod_wind_fy = GUICtrlCreateInput("", 208, 608, 121, 21)
Global $kod_coe_y = GUICtrlCreateInput("", 208, 632, 121, 21)
Global $kod_trim = GUICtrlCreateInput("", 208, 656, 121, 21)
Global $kod_heel = GUICtrlCreateInput("", 208, 680, 121, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
Global $Label26 = GUICtrlCreateLabel("Location of cribbing data:", 16, 712, 150, 17)
Global $kod_cribfilefolder = GUICtrlCreateInput("", 208, 712, 121, 21)
;~ Global $kod_cribfilefolder = GUICtrlCreateInput("D:\my_autoitscripts\cribbing\new", 208, 712, 121, 21)
Global $Label27 = GUICtrlCreateLabel("File name for cribbing data :", 16, 740, 150, 17)
Global $kod_cribfile = GUICtrlCreateInput("coords_.txt", 208, 740, 121, 21)


Global $Label28 = GUICtrlCreateLabel("File name for output file:", 16, 770, 137, 17)
Global $kod_outname = GUICtrlCreateInput("Tmp.txt", 208, 770, 121, 21)

Global $Label29 = GUICtrlCreateLabel("Crop factor for verification (m):", 16, 800, 157, 20)
Global $kod_crop = GUICtrlCreateInput("1", 208, 800, 121, 20)
Global $Button2 = GUICtrlCreateButton("Run", 208, 830, 121, 25)
Global $Readme = GUICtrlCreateButton("Read me", 20, 830, 121, 25)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit


        Case $Button11
            Global $dir=guictrlread($kod_locn)
            FileDelete($dir&"\Coord_crib.txt")
            Global $coordfile=fileopen($dir&"\Coord_crib.txt",1)
            Filewrite($coordfile,"! This file has coordinates for the cribbing program"&@CRLF)
            Filewrite($coordfile,"! DXF File         : No DXF file used. Coordinates are entered manually in this file"&@CRLF)
            Filewrite($coordfile,"! Additional Notes : X1, Y1, X2, Y2 & Thk to be entered with a comma"&@CRLF)
            Filewrite($coordfile,"! Prepared on      : "&@MDAY & "/" & @MON & "/" & @YEAR  & " " & @HOUR & ":" & @MIN & ":" & @SEC&@CRLF)
            Filewrite($coordfile,"     X1  ,     Y1  ,     X2  ,      Y2 ,  Thk"&@CRLF)
            fileclose($coordfile)
            Msgbox(0,"Status","Template file 'Coord_crib.txt' created")
            Exit


            Endswitch

Wend

 

Edited by Melba23
Added code tags
Link to comment
Share on other sites

9 hours ago, Danp2 said:

Sorry... but my crystal ball is broken. You'll need to show us your code if you want anything more than a wild guess.

Hi, i have posted the code below.

Link to comment
Share on other sites

  • Moderators

Rskm,

When you post code in future please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation.

And please do not double post - I have deleted the duplicate.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Your issue is caused by these lines ---

Global $Labe33 = GUICtrlCreateLabel("1. Input 1", 16, 80,300,200)
Global $Labe34 = GUICtrlCreateLabel("2. Input 2", 16, 120,300,200)
Global $Labe34 = GUICtrlCreateLabel("3. Input 3", 16, 185,300,200)
Global $Labe35 = GUICtrlCreateLabel("4. Instructions", 16, 250,300,200)

With a height of 200, they are overlapping the lower controls thus preventing them from being clicked with the mouse.

Link to comment
Share on other sites

On 7/29/2020 at 10:25 AM, Melba23 said:

Rskm,

When you post code in future please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags. Thanks in advance for your cooperation.

And please do not double post - I have deleted the duplicate.

M23

ok, noted. thanks 

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

×
×
  • Create New...