Re: Extended Window focus


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Grant E Foraker on November 05, 2020 at 09:53:37: Uploaded files: 1

In Reply to: Re: Extended Window focus posted by Barbara Brazil on November 05, 2020 at 06:11:19:

The demo looked good (#13). I could see the title of window 2 flash as it got focus and displayed the data. Then flashed back to window 1. But it doesn't work in my program.

--------------------------------------------------------------------------------
!-------------------- Create Extended Window ----------------------------------!
LET ExBR = 4 ! ROWS ROW OF WINDOW
LET ExCW = 40 ! WIDTH IN COLUMNS
LET ExFlags = 0 ! CHILD
LET ExStyle = 4 + 64 ! caption, visible
LET ExHI = 52 ! Horizontal COLUMN
LET ExVI = 26 ! Vertical ROW
LET ExCaption$ = "Department Hours Maintenance"
PRINT (CreateWindowEx = ExHI, ExVI, ExCW, ExBR, ExStyle, ExFlags, ExCaption$)
PAUSE (2)
INPUT ExWindowHandle$
!------------------------------------------------------------------------------!
EDB10:
PRINT @(0,1);(SB);'DEPARTMENT';(SF);(BF)
PRINT @(0,2);(SB);'HOURS ';(SF);(BF)
INPUT @(15,1) WDEPT$
IF STRIP(WDEPT$) EQ '' GOTO EDB90
IF LEN(STRIP(WDEPT$)) NE 2 GOTO EDB10 ! WRONG LENGTH
FOR DEPT = 1 TO MAXDEPT
IF WDEPT$ EQ WORKDEPT$(DEPT) GOTO EDB20 ! DEPT FOUND, GET HOURS
NEXT DEPT
GOTO EDB10
EDB20:
PRINT @(10,2);JDCBUD(DEPT)
INPUT @(10,2) JDCBUD(DEPT)
GOSUB DisplayJobDeptBudget ! REFRESH BUDGET LIST
Print (SelectWindowEx = ExWindowHandle$, 1)
GOTO EDB10 ! GET NEXT DEPT
EDB90:
!------------------- Close Extended Window ------------------------------------!
PRINT (DeleteWindowEx = ExWindowHandle$) ! CLOSE WINDOW
!------------------------------------------------------------------------------!
PRINT (AllowMaximize=False)
!!!!! GOSUB DisplayJobDeptBudget ! REFRESH BUDGET LIST

When it first comes up the window has focus. I entered dept 50 and 55 hours. The ListView updated and the dept & hours fields cleared but the focus didn't return.

Maybe the two Ex window approach might work. Save the ListView update until all the data is entered.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]