Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28859 Discussions

SETWINDOWCONFIG scroll bar won’t go away

RonH
Beginner
1,292 Views

Using VS2022 Community Edition with Intel Fortran, the horizontal scroll bar on the child window won’t go away.

 

To investigate this issue I created a short test code. I compiled and ran it in Compaq Visual Fortran Professional Edition 6.5.0. Then, adding the Intel Fortran libraries to the code, I compiled and ran it in MS VS2022 Community Ed. (64 bit) ver 17.0.4 with Intel Fortran Compiler Classic and Intel Fortran Compiler for Windows 2022.2.19749.

 

Running the code in Compaq Visual Fortran results in a child window with no scroll bars. Running the same code in VS Community/Intel Fortran Classic results in a horizontal scroll bar and no vertical scroll bar. No matter how I change the values in the winfo and wc structures (types) of setwsizeqq and setwindowconfig, there is always one more character (width) in the window configuration than in the window size, resulting in a horizontal scroll bar.

 

Further, the child window created in Compaq Visual Fortran does NOT scroll when the pgm runs, but the child window created by VS Community DOES scroll up. I cannot find a studio control or compiler setting in the Intel Fortran Reference or in the Studio pull-down menus that controls scrolling and not scrolling when a child window is opened.

 

There are scroll commands for a text window but I need to use setwindowconfig for the graphics, and I don’t know if graphics will work the same way in a text window.

 

Does anyone know of a function, function attribute, studio or compiler setting to eliminate this horizontal scroll bar? Is there a way to correct the problem and recompile setwindowconfig in ifqwin.fxx without having to install a new Fortran compiler?

 

Thank you.

 

RonH

0 Kudos
7 Replies
jimdempseyatthecove
Honored Contributor III
1,281 Views

Are you running a QuickWin application?

If yes, does increasing the horizontal width of the child window eliminate the horizontal scroll bar?

If yes, then prior to 1st show window, increase the horizontal width of the child window a tad.

 

Jim Dempsey

0 Kudos
RonH
Beginner
1,211 Views

Yes, I am creating a QuickWin application.

 

Increasing the width of the child window using winfo%x (of setwsizeqq) to a value greater than wc%numtextcols (of setwindowconfig) does NOT eliminate the horizontal scroll bar at the bottom of the child window.

 

In contrast, increasing the height of the child window using winfo%y (of setwsizeqq) to a value greater than wc%numtextrows (of setwindowconfig) DOES eliminate the vertical scroll bar on the right side of the child window.

 

In summary, the horizontal scroll bar does NOT behave as it did in Compaq Fortran, however the vertical scroll bar does behave as it did in Compaq Fortran.

 

0 Kudos
andrew_4619
Honored Contributor III
1,274 Views

A long long time since I have used Quickwin. I think the horizontal scroll comes automatically as a function of the specified number of text cols in the selected font being more pixels than the width. So you need to change font,  increase pixels or reduce cols I think.

0 Kudos
RonH
Beginner
1,211 Views

I tried all three (and more) but nothing got rid of the horizontal scroll bar at the bottom of the child window.

0 Kudos
wtstephens
New Contributor I
1,117 Views

Looking for a solution to the same problem.

 

Need to eliminate the horizontal scroll bar because it covers up the last line of text when the cursor reaches the bottom.

 

Also migrating a QuickWin program from Compaq Visual Fortran.

 

0 Kudos
wtstephens
New Contributor I
1,112 Views

Actually, this little hack temporarily fixes my issue that the scrollbar overlaps the bottom line of text by default.

 

It just sets the text window to 2 lines less than whatever it was after calling SETWINDOWCONFIG.

    ! *** set text window size, 2 less rows prevents scroll bar overlap
    call GETTEXTWINDOW(r1,c1,r2,c2)
    r2 = MAX(r2-2,1)
    call SETTEXTWINDOW(r1,c1,r2,c2)

One line less was not quite enough.  Ha ha!

 

Here is what it looks like now:

wtstephens_0-1677707130074.png

At the first prompt I entered the "6", and the text scrolled up when the second prompt was written.

Without my little fix above, the second prompt was displaying under the scroll bar.

 

0 Kudos
wtstephens
New Contributor I
1,085 Views

Here is an improved fix for the scrollbar problem -- it turns off both scrollbars, which then allows the text window to need only 1 line less than its initial size.

    HWNDC = GETHWNDQQ( 0 )

    ! *** set text window size, 1 less row prevents partial line
    call GETTEXTWINDOW(r1,c1,r2,c2)
    r2 = MAX(r2-1,1)
    call SETTEXTWINDOW(r1,c1,r2,c2)

    ! *** disable both scrollbars
    ioerr = ShowScrollBar(HWNDC,SB_BOTH,.FALSE.)

Gives this -- the horizontal scrollbar is gone, and the bottom text line is closer to the bottom of the window.

wtstephens_0-1677771932761.png

If the window is re-sized then the scrollbars come back, and then when re-stretched the scrollbars should both go away automatically but the horizontal one doesn't -- a bug I think.  In that case, the above code can be re-run to make the scrollbars turn off again.

 

0 Kudos
Reply