PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - David Reynolds

Pages: [1]
1
Programming / Re: Monitor in Portrait Mode can't Maximize
« on: November 24, 2023, 10:06:12 AM »
Sadly, much older than that (2017).
Is there any way to tweak the MaxHeight in my current version, or is that in one of the compiled bits?

I've got a partial workaround regarding the monitor orientation.

INVOKE WAIT HIDE "[wdx]powershell Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens > Monitors.txt"

Then if I do some parsing/reformatting of the results in Monitors.txt I get:

DISPLAY1|0,0,1920,1080|0,0,1920,1034|T
DISPLAY2|-1080,-1082,1080,1920|-1080,-1082,1080,1880|F
DISPLAY3|0,-1080,1920,1080|0,-1080,1920,1040|F

I can work with that for now.

2
Programming / Monitor in Portrait Mode can't Maximize
« on: November 22, 2023, 12:31:43 PM »
I've got a multi-monitor setup like the attached.
All three monitors are 1920x1080 (or 1080x1920 in the case of M3).
I've got a resizable panel (starts at XYClient=1068,800) that will maximize properly on M1 and M2, but not on M3.
If I use the maximize button it will go to a height of about 1072, or if I manually drag to resize, it caps out at 1232.
It's like it doesn't recognize that the monitor is in portrait mode and caps the height as if it were landscape.

XYMonitors returns
\\.\DISPLAY1,0,0,1920,1080
\\.\DISPLAY2,-1080,-840,0,1080
\\.\DISPLAY3,0,-1085,1920,-5

Any ideas?

Thanks!

3
Nomads / Re: delete items from a listbox with <DEL>
« on: March 19, 2020, 01:15:08 PM »
This works for me in my application:
Panel does not have User CTLs defined
ListBox defined with Multiple Selections only (not Automatic, or SOE)

In the PROCESS_LB logic I have:

Code: [Select]
IF (_EOM$=$2E$) THEN {
 LIST_BOX READ MY_LB.CTL,SELECTED$; LET SELECTED$=STP(MNEMONIC SELECTED$)
 WHILE POS("~"=SELECTED$) ! I use ~ as my row separator
 LET X$=SELECTED$(1,POS("~"=SELECTED$)-1),SELECTED$=SELECTED$(POS("~"=SELECTED$)+1)
 READ DATA FROM X$ TO LINE$
 ! do whatever you gotta do with LINE$
 WEND
}
IF (_EOM$=$02$ OR _EOM$=$0D$) THEN {
! whatever you need to do on a double-click/Enter
}

4
Programming / Re: Selecting all list_box entries
« on: September 19, 2019, 10:51:20 AM »
James,

You should simply be able to issue a

LBCTL'SelectCount=0

to deselect everything.

David

5
Nomads / Re: Ending a Never-Displayed Panel
« on: September 13, 2019, 10:24:03 AM »
Does that include skipping any automated system wrap-up like "Auto Close Files" as well, or does it just skip the developer defined On-Exit?

6
Programming / Re: image/png;base64 string to actual png
« on: June 07, 2019, 03:37:55 PM »
Nailed it again.
Thanks!

7
Programming / Re: image/png;base64 string to actual png
« on: June 07, 2019, 03:15:23 PM »
Next thing I need is to print the PNG to a PDF.
We're on PxPlus 2016 on CentOS so my understanding is that there is no direct support for 'PICTURE' with a PNG to PDF (and my tests confirm this).
I tried using the ImageMagick 'convert' utility to change my PNG to JPG but that still doesn't render in the PDF.
Do I have to pass some special options to 'convert' to get a specific type of JPG that's compatible with printing to PDF from Linux?

Thanks again,
David

8
Programming / Re: image/png;base64 string to actual png
« on: June 04, 2019, 03:22:24 PM »
Worked like a charm.
Thanks Mike!

9
Programming / image/png;base64 string to actual png
« on: June 04, 2019, 02:30:39 PM »
I am calling an external API and one of the returned JSON values is a customer signature encoded as
image/png;base64,iVBORw0KGg.......
How do I take that string and create an actual fileName.png (or gif, jpg, bmp, etc)?

Thanks,
David

10
Programming / Re: client time
« on: September 20, 2018, 10:23:45 AM »
I'm not sure if there's a Windows equivalent, but on Linux we use something like this...

Each user is assigned a location, and each location is assigned a time zone (matching those in /usr/share/zoneinfo)
So for local time we just issue:

Code: [Select]
READ RECORD("| TZ="+TZ$+" date +%Y%m%d%H%M%S")USERTIME$

where
Code: [Select]
TZ$="Canada/Pacific" ! or Canada/Mountain or Canada/Central or America/Toronto or Greenwich etc

11
Programming / Re: Chart Colours
« on: August 27, 2018, 10:46:56 AM »
No presets.

I have a working model now using 'CurrentSet and 'TextColour$
If you want to continue this off-list, that would be fine.
Or not. :)

Thanks

12
Programming / Re: Chart Colours
« on: August 24, 2018, 03:12:48 PM »
In my PreDisplay logic I have:
%Nomad_Chart$="google"

Then I tried each of:
1. %Nomad_Chart_Colors$="Light Green/Light Cyan/Light Magenta/Light Blue/Light Yellow/Light Red/"
2. %Nomads'Chart_Colors$="Light Green/Light Cyan/Light Magenta/Light Blue/Light Yellow/Light Red/"
3. %INomads_Template$="MyChartTemplate" (where I created lib/_plus/inomads/templates/MyChartTemplate/chart_clrs.txt)

To no avail.
I also tried them all with %Nomad_Chart$="" (native) with no luck.

I ultimately had to put
MyChart.ctl'currentset=1,MyChart.ctl'TextColour$="Light Green"
MyChart.ctl'currentset=2,MyChart.ctl'TextColour$="Light Cyan"
etc, etc

Is there something I'm missing?

13
Programming / Re: Chart Colours
« on: August 24, 2018, 12:31:27 PM »
Never mind...I found
%NOMADS'Chart_Colors$

14
Programming / Chart Colours
« on: August 24, 2018, 11:52:24 AM »
Given chart data
1/2/3/4/5/6/
How do I assign a different default colour set?
i.e. rather than the default of Light Red, Light Green, Light Blue, Light Yellow, Magenta, Cyan I would rather have Light Green, Cyan, Magenta, Light Blue, Light Yellow, Light Red
Perferably the built-in PxPlus Chart, but could switch to "fusionfree" or "google" if necessary (I see that they both have the 'Set_Clr$() method - but I don't know the call syntax)
Thanks

Pages: [1]