Highlighted Text in Text Editor

I have a data entry form, that starts with a date field. I’m trying to use the previous record’s date as the default, then highlight the “dd” text in the cell automatically, so that I can hit “Tab” if the date hasn’t changed, or just type in those two numbers if the day has changed, but not the month and/or year. I did this in an old checkbook database, Pan 3 or 4, I think, and it really sped up data entry. I think I was using “GetSelection”, “SetSelection” and other related SO commands that seem to have been deprecated in PanX, so I’m wondering if the same functionality exists in the new guy and, if so, just what that might look like. (?)
Has anyone done anything like that in PanX?

These commands haven’t made it into the new documentation, but they are there and they work just the same as before.

I tried
Object “DateBlock” ,“SetSelection”, 4,6, and
SuperObject “DateBlock” ,“SetSelection”, 4,6, and
ObjectAction “DateBlock” ,“SetSelection”, 4,6

where the Text Edit Object was named “DateBlock”.
The first example just said “Syntax Error”, where the other two threw this error msg.
“The form object targeted by the ObjectAction statement does not support this action: SETSELECTION”

If it’e really coming, though, I can wait. :wink:


I just created a form with a Text Editor option named “Editor”, then wrote a procedure with this code:

objectaction "Editor","open"
objectaction "Editor","setselection",1,4

When I ran the code, I got this:

I’m guessing that you have an additional object in your form that is called “DateBlock”, and that object is not a text editor.

By the way, objectaction and superobject are exactly the same command, just different names. The object statement is something else entirely.

Bottom line, no waiting – I just checked source control and setselection has been supported in Panorama X for over 3 years now.

Yup. The Date label was also named DateBlock. (Before I found the simple way to name objects, I was messing around with the Blueprint method. I guess I was temporarily blinded by all that power…)
Then I tried it without the “open” command, and that didn’t work, either.
I guess it’s a good thing I’m not a pilot. :sunglasses: