[Migrated content. Thread originally posted on 09 October 2009]
I have an issue with trying to use the Layout Manager.I downloaded AcuCorp's sample, and ran it, it worked fine. I tried to incorporate this into one of my programs, and the Layout Manager did not work. I then tried to copy AcuCorps window into my program and then the sample window did not work.
I contacted technical support, they agreed it did not work, but suggested I post here, unless I want to pay an engineer to look at my program and tell me why it doesn't work. :)
Basically, I have three problems.
1. My current window is 25 lines and 70 columns. This is the smallest I want the window to be. When I add the RESIZABLE clause to the window, it automatically comes up full screen and totally ignores the size and lines, maximized and you cannot "resize" until you "restore" it.
2. So, in order to have the window come up the small size I want it to be, I added the ACTION ACTION-RESTORE to my window, which makes it almost the size I want it to be by default -- it is two lines shorter than it is supposed to be, but if you click on it to move it or resize it, it makes it the right size.
I understand from reading the documentation that when you use RESIZABLE, your window should be a maximum size. But, we have over 400 programs and all our controls are designed to fit and look nice on the current window sizes, which is what I want to make the minimum size. The ACTION ACTION-RESTORE is fine and it works for me, but the window is two lines too small. But, when you click on the window, it makes it the right size, but it doesn't trigger any kind of even. It's a little strange.
Whether I use the ACTION to restore my window, or just click on it myself to restore down, when I drag the window to resize it, the LAYOUT MANAGER is not working. The fields do not change.
If I change the window to a FLOATING window, it does.
I can probably work around issues 1 and 2, although, if anyone has any ideas on dealing with displaying windows that are really displayed up-front in the minimum size, that would be great. But, I really need to figure out what is different in my window that the LAYOUT MANAGER does not work.
This is the program I sent to Tech Support that they agreed does not work, they didn't know why though.
IDENTIFICATION DIVISION.
PROGRAM-ID. DMOE100N.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. DG-ICOBOL.
OBJECT-COMPUTER. RYAN-MCFARLAND.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
78 ACTION-MINIMIZE VALUE 20.
78 ACTION-MAXIMIZE VALUE 21.
78 ACTION-RESTORE VALUE 22.
77 LM-RESIZE HANDLE OF LAYOUT-MANAGER, LM-RESIZE.
78 RLM-RESIZE-X VALUE 1.
78 RLM-RESIZE-Y VALUE 16.
78 RLM-RESIZE-BOTH VALUE 17.
01 WL-CODE-DATA.
03 WL-CODE-NO PIC X(6).
03 WL-CODE-DESC PIC X(30).
03 WL-DUE-CODE PIC X.
77 DEFAULT-FONT HANDLE OF FONT.
77 SMALL-FONT HANDLE OF FONT.
77 TOOLBAR-1 HANDLE OF WINDOW.
77 PROG-WIN-HANDLE HANDLE OF WINDOW.
77 KEY-STATUS IS SPECIAL-NAMES CRT STATUS PIC 9(4) VALUE 0.
88 Exit-Pushed VALUE 27.
LINKAGE SECTION.
SCREEN SECTION.
01 SCRN-G1.
03 SCRN-FRAME FRAME RAISED HEAVY
LINE 4 COL 2 LINES 2 SIZE 67 CELLS
MIN-HEIGHT = 2
MIN-WIDTH = 67
LAYOUT-DATA = RLM-RESIZE-BOTH.
03 LABEL LINE 0.5 COL 2.4 "Code" FONT DEFAULT-FONT.
03 LABEL COL 9.5 "Description" FONT DEFAULT-FONT.
03 SCRN-CODE-LIST LIST-BOX USING WL-CODE-DATA 3-D ID 2
NOTIFY-DBLCLICK NOTIFY-SELCHANGE
LINE 1.5 COL 2 LINES 18 CELLS SIZE 67 CELLS
DATA-COLUMNS = (1,7,37,38,41,42,45)
DISPLAY-COLUMNS = (1,8,47,50,54,57,61)
ALIGNMENT = ("L","L","C","R","C","R","R")
LAYOUT-DATA = RLM-RESIZE-BOTH.
01 TOOLS-REC.
03 PUSH-BUTTON SELF-ACT "Exit Program"
BITMAP FLAT
SIZE 16 LINES 15 COL 2
EXCEPTION-VALUE 27.
03 TB-ADD-BUTTON PUSH-BUTTON SELF-ACT
TITLE "Add a New Code"
BITMAP FLAT BITMAP-NUMBER = 13
SIZE 16 LINES 15 OVERLAP-LEFT
EXCEPTION-VALUE 01.
03 TB-CHG-BUTTON PUSH-BUTTON SELF-ACT
TITLE "Change Code"
BITMAP FLAT BITMAP-NUMBER = 18
SIZE 16 LINES 15 OVERLAP-LEFT
TERMINATION-VALUE = 13.
03 TB-DEL-BUTTON PUSH-BUTTON SELF-ACT "Delete Code"
BITMAP FLAT BITMAP-NUMBER = 6
SIZE 16 LINES 15 OVERLAP-LEFT
EXCEPTION-VALUE 02.
03 PUSH-BUTTON SELF-ACT "Print Codes File Listing"
BITMAP FLAT BITMAP-NUMBER = 12
SIZE 16 LINES 15 OVERLAP-LEFT
EXCEPTION-VALUE 03.
03 PUSH-BUTTON SELF-ACT "Help On Codes File Maintenance"
BITMAP FLAT BITMAP-NUMBER = 11
SIZE 16 LINES 15 OVERLAP-LEFT
EXCEPTION-VALUE 951.
PROCEDURE DIVISION USING RM-LINKAGE-AREA.
DECLARATIVES.
END DECLARATIVES.
MAIN SECTION.
OPEN-SHOPPE.
2000-GUI-MAINT.
ACCEPT SMALL-FONT FROM STANDARD OBJECT "SMALL-FONT".
ACCEPT DEFAULT-FONT FROM STANDARD OBJECT "DEFAULT-FONT".
DISPLAY STANDARD GRAPHICAL WINDOW
HANDLE IN PROG-WIN-HANDLE
MODELESS BIND TO THREAD
CELL SIZE = LABEL FONT SMALL-FONT
CONTROL FONT SMALL-FONT
TITLE "Codes File Maintenance"
LINES 25
SIZE 70
BACKGROUND-LOW
SYSTEM MENU
MIN-SIZE 70
MIN-LINES 25
RESIZABLE
ACTION ACTION-RESTORE
LAYOUT-MANAGER = LM-RESIZE.
DISPLAY TOOL-BAR LINES 2 HANDLE IN TOOLBAR-1.
DISPLAY TOOLS-REC UPON TOOLBAR-1.
DISPLAY SCRN-G1.
PERFORM UNTIL Exit-Pushed
ACCEPT SCRN-G1
END-PERFORM.
CLOSE WINDOW PROG-WIN-HANDLE.
STOP RUN.
Thanks for any help,
Rebekah



