Supergettext options

Supergettext is ignoring font, size and style settings in b18. It also ignores options set in SuperGetTextDefaultOptions. Not certain when this regression started after having been fixed in b12, as I’ve only just started using it. Superalert and superchoicedialog repaired at the same time still seem to be working properly.

It appears to work for me. I tried this code:

letfileglobal phonenumber=""
supergettext phonenumber,{font=Avenir-Black size=24}

And this is what I got.

I am actually using b19, but I don’t think that makes any difference for this issue. But you should download and install it.

I was referring to the font, style and size settings of the caption. Like you, I can set the font, style and size of the entered text, but not the caption as documented:

You can also change the font, size, style and color of the caption.

supergettext CardNumber,{caption="Please enter your card number"
    font="Palatino" size=14 style=bold color="#999999"}

It’s not clear that the supergettext statement can differentiate between caption font options and entry text font options as currently documented:

The edited text normally appears in the standard system font, but you can change the font, size, style and color. This example changes the edited text to be blue, bold, 15 point Tekton.

supergettext phonenumber,{font=Tekton size=15 style=bold color="#0000FF"}

I expected the caption font options to be consistent across these related super objects (superalert, superchoicedialog etc) but in supergettext you seem to have applied the font options to the entry text and not the caption text as in the others.

Incidentally, I have switched to b19, thanks, and you’re correct about it not making any difference.

That’s a mistake in the documentation. There are separate options for the caption parameters: captionfont=, captionsize= and captioncolor. It looks like these options were documented in Panorama 6 but the mistake was made in the rewritten Panorama X documentation.

Also note that Panorama X doesn’t support the style option, instead you have to use a bold font (or italic, if that’s what you want).

I have submitted corrections to the documentation for this.

I regret to say that captionfont= and captionsize= do not work, while captioncolor= and captionheight= do work. (I experimented with captionfont= before I first posted, on the off chance.) In addition, the default caption height is almost nothing, so you have to set captionheight=2 for a single line of caption text to clear the top of the entry box.

Reported and fixed (for b20)

Don’t forget that you can create your own custom dialogs from a form very easily with the rundialog statement. Then you can arrange the dialog any way you want.

Thanks, Jim. I’m trying to reduce the number of forms (and procedures for that matter) which were so numerous in one of my databases that the View menu was almost three pages long and quite trying to use. Callwithin helps enormously, and so do functional SOs like supergettext and superalert.

Two more issues with supergettext:

Following entry, the return key does not implement the highlighted button and close the dialog unless the key is pushed twice. The first time only turns off the focus ring around the text entry box.

If bgcolor= is used, the color does not fill the entire dialog, it leaves a section uncolored, and the focus ring is hidden in the colored section.

Upon checking supertext found that the return key does not close the dialog no matter how many times it’s pushed.

Sorry, that should read

Upon checking superalert

IMHO the blue default button does not react to the Return key, but to the Enter key. So on a Macbook, you would have to press fn-return.

Many PX blue default buttons do react to the Return key. But as you say the ones mentioned above, which do not, both react immediately to fn-return. It’s a pity that MacBooks don’t have an Enter key as the computers I program for do have them. So I’ve been mapping my MacBooks’ right-hand Option keys as Enter keys. The PX behaviour is the same as my initial comments about the Return key, so in PX there seems to be a difference between an actual Option key and an ersatz one. However in P6 my remapped key does activate all blue default buttons, exactly like fn-return and a proper Option key.

Thanks for your reminder about fn-return.

I’ve been doing that for years using the free tool Karabiner-Elements. Setting that up is one of the first things I do on a new computer.