Page 1 of 8
EasyPtr4
Posted: Tue Jul 05, 2022 3:58 pm
by Martin_Head
I am trying to learn to use EastPtr4, but I am hitting a few obstacles along the way.
First - If I create a new loose item
Then set up the Underline and key. Then do the Text_input

- Image1B.png (8.8 KiB) Viewed 3708 times
The 'e' of 'hello' is not underlined, and if I look at the menu item

- Image1D.png (5.83 KiB) Viewed 3708 times
The underline and the key have been reset. And need to be redone again.
Is this a bug, or am I doing something wrong, or in the wrong order.
Re: EasyPtr4
Posted: Tue Jul 05, 2022 4:02 pm
by pjw
Martin_Head wrote:<>
Is this a bug, or am I doing something wrong, or in the wrong order.
Just the wrong order. Set the text first then the underline
Re: EasyPtr4
Posted: Tue Jul 05, 2022 4:06 pm
by Martin_Head
Second - I create a menu and set the Mode to 4
When I run it. It's not the same colour scheme
How do I change the way it's displayed.
Note that the Application window has automatically added scroll bars, because the data does not fit.
If I reduce the window size, so the contents no longer fit horizontally
I don't get the pan bars. And it falls over.
I played with this menu and got permanent scroll and pan bars to appear.
But the Application window would not get filled with information
Also on page 10 of the Easyptr4 manual in the code for resizing a menu there is
200 xs%=ptr%(8)-x%
210 ys%=ptr%(9)-y%
I have an example that Dilwyn Jones did (eptr4scale) where he adds rather than subtracts
Which is correct? I have tried both ways, and they both seem to work much the same.
Here's my test program
Re: EasyPtr4
Posted: Tue Jul 05, 2022 5:52 pm
by dilwyn
Most examples will probably use '-' - it's largely personal taste in how you want the resize to work and where you put the resize icons.
Some of my programs contain resize icons at top left and bottom right of the menu. So it makes sense in that respect that if use the top left one, I want to resize upward. Using the bottom right icon resize would occur in the opposite direction (i.e. the origin would stay in the same place).
Depends really if you want resizing to work by leaving the origin (top left) of a menu in the same place.
I don't think there's a right or wrong here, it's just a matter of getting it to work how you want it.
Regarding the application window menus, I remember that Alain Haoui fixed some issues with these menus. I can't remember the details (maybe to do with WM.INDEX?), I do think that he posted information on here and it got integrated into SMSQ/E roughly version 3.38. I've never used the application window -> menu options (or if I did I've since forgotten), just using MAWDRAW keyword to draw a string array as a menu has always sufficed for me.
Re: EasyPtr4
Posted: Tue Jul 05, 2022 6:19 pm
by desin
hello Martin
the eptr4scale program is not in best shape
after some struggle i came up with this
- vd.zip
- (27.1 KiB) Downloaded 217 times
please take a look
greetings from Switzerland
Markus
Re: EasyPtr4
Posted: Wed Jul 06, 2022 9:51 am
by Martin_Head
pjw wrote:Martin_Head wrote:<>
Is this a bug, or am I doing something wrong, or in the wrong order.
Just the wrong order. Set the text first then the underline
I've been trying to use Norman Dunbar's tutorial for EasyPtr3. He sets the underline, the key, then the text_input. But he does not say that you have to go back and re-edit the loose item. I don't have a copy of EasyPtr3 to compare it with, that's why I thought it might be a bug. I did find a copy of EasyPtr1 on an old floppy disk. But that does the text input on a loose item differently.
Re: EasyPtr4
Posted: Wed Jul 06, 2022 9:54 am
by Martin_Head
desin wrote:hello Martin
the eptr4scale program is not in best shape
I had to sort out a lot of mixed #ch, and #channel to get it to work.
Re: EasyPtr4
Posted: Wed Jul 06, 2022 10:11 am
by Martin_Head
dilwyn wrote:just using MAWDRAW keyword to draw a string array as a menu has always sufficed for me.
That's what I am trying to do. But what I can't seem to get to work. Is if the string is longer than the width of the application window, Then pan bars are added so you view the whole string. What I have read in the manual, If I understand it correctly, is that if the array does not fit in the application window, then scroll and pan bars are added automatically. Scroll bars get added, but the pan bars don't seem to be.
Am I doing something wrong, or can't you do that.
Re: EasyPtr4
Posted: Wed Jul 06, 2022 7:19 pm
by Derek_Stewart
Hi,
Have looked at Normans's PEIG which is Eptr 3, but the concepts are the same.
Re: EasyPtr4
Posted: Thu Jul 07, 2022 11:01 am
by BSJR
Martin_Head wrote:dilwyn wrote:just using MAWDRAW keyword to draw a string array as a menu has always sufficed for me.
That's what I am trying to do. But what I can't seem to get to work. Is if the string is longer than the width of the application window, Then pan bars are added so you view the whole string. What I have read in the manual, If I understand it correctly, is that if the array does not fit in the application window, then scroll and pan bars are added automatically. Scroll bars get added, but the pan bars don't seem to be.
Am I doing something wrong, or can't you do that.
If array text runs longer than the AW widow you need to specify a column width that fits. The same goes for the height but that's unlikely to occur with text.
The xsz%,ysz% parameters for MAWDRAW do just that. Text will be truncated at the column width. If the next column doesn't fit nothing from that column will be shown.
Take a look at SuQcess for a multi-column /-row example.
https://home.hccnet.nl/b.spelten/ql/suqcess2.html
BSJR