April 18, 2024, 01:29:01 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Revised Ascii Table

Started by GWS, November 01, 2018, 05:03:38 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

Hi,

Here's another little program I use quite a bit, to select Ascii characters.

It uses a Listview control - which I'm not very impressed with - it's a bit clunky in it's basic form.

I've amended the Listview in this program, to draw lines for row and columns, and highlight the whole line if you click anywhere on a multi-column control.  It looks much better now.

I had to use some 'magic' constants to achieve this - which I don't like doing.  Still, as long as it does the job.

The extended Ascii characters vary, so I used the set most often found.

The program is attached.

all the best, :)

Graham






Tomorrow may be too late ..

Brian

Graham,

Hope you don't mind, but I converted your program to IWB, moved the buttons around, and put in the code to show the selected character when you move up or down the listview with the cursor keys

Brian

GWS

That sounds interesting Brian ..

Thanks also for pointing out the Ascii 38 & problem.

That was a weird one ..  ::)

It turns out that you can't display an & sign in a textbox ..  Never came across that before.

For instance, if you try to display A&B  - you will get the A followed by an underscored B - very odd.

I tried several tricky workarounds with no success.

In fact the Ampersand character was there, you just can't see it.

So the easiest way was to replace the upper right hand text box, with an Edit box.

The Ampersand is now there, but of course the Edit box brings problems of it's own.
So I made it Read-only so that the text can't be changed.
I also put in a bit of code so that if you click on the Edit box, the cursor does not appear.
In practice, it's just a classy Text box ..  :)

Hope it will be OK now.  I'll check out your IW mods ..

The new version is attached ..

All the best, :)

Graham

Tomorrow may be too late ..

Brian

Graham,

Well worked out. I will take a look at your mods and apply it to the IWB version

Brian

Brian

Hi,

Just modified my IWB version of Graham's Ascii chart, and put in his modifications. Looks OK to me

Brian

fasecero

Create the static with SS_NOPREFIX to display an & sign in a textbox

CONST SS_NOPREFIX = 0x00000080

https://docs.microsoft.com/en-us/windows/desktop/controls/static-control-styles

QuoteSS_NOPREFIX

Prevents interpretation of any ampersand (&) characters in the control's text as accelerator prefix characters. These are displayed with the ampersand removed and the next character in the string underlined. This static control style may be included with any of the defined static controls. You can combine SS_NOPREFIX with other styles. This can be useful when filenames or other strings that may contain an ampersand (&) must be displayed in a static control in a dialog box.

Brian

Well spotted. I was sat in the little room, when I realised it was thinking that the & was being interpreted as an accelerator

Brian

Andy

And if you want an ampersand in a button, you double it like this....

CONTROL win4,@SYSBUTTON,"Save && Restart program",20,440,200,30,@TABSTOP,FileOk

Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

GWS

I've incorporated Brian's idea to scroll the Listview
- it behaves pretty well now.

All it needed, was to OR the (@NOTIFYCODE = @LVNITEMCHANGED), with the (@NOTIFYCODE = @NMCLICK) in the messages subroutine ..

case 10
' Listview clicked or scrolled - Read the data from @QUAL into mem
   if(@NOTIFYCODE = @NMCLICK) | (@NOTIFYCODE = @LVNITEMCHANGED)
   mem = @QUAL
   READMEM mem,1,lv

.... etc ....


All the best, :)

Graham
Tomorrow may be too late ..