EasyPtr4

Anything QL Software or Programming Related.
Post Reply
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

EasyPtr4

Post 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
Image1A.png
Then set up the Underline and key. Then do the Text_input
Image1B.png
Image1B.png (8.8 KiB) Viewed 1991 times
The 'e' of 'hello' is not underlined, and if I look at the menu item
Image1C.png
Image1D.png
Image1D.png (5.83 KiB) Viewed 1991 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.


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: EasyPtr4

Post 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


Per
dont be happy. worry
- ?
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post by Martin_Head »

Second - I create a menu and set the Mode to 4
Image2A.png
When I run it. It's not the same colour scheme
Image2B.png
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
Image2C.png
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
Image2D.png
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
TestProg.zip
(1.16 KiB) Downloaded 75 times


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: EasyPtr4

Post 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.


User avatar
desin
Chuggy Microdrive
Posts: 50
Joined: Mon May 10, 2021 10:33 am

Re: EasyPtr4

Post 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 87 times
please take a look

greetings from Switzerland
Markus


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post 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.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post 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.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: EasyPtr4

Post 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.


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: EasyPtr4

Post by Derek_Stewart »

Hi,

Have looked at Normans's PEIG which is Eptr 3, but the concepts are the same.


Regards,

Derek
User avatar
BSJR
Trump Card
Posts: 182
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: EasyPtr4

Post 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


Post Reply