# Pattern pictures

**URL:** <https://clarionhub.com/t/pattern-pictures/6909>\
**Category:** questions\
**Tags:** language\
**Created:** [January 10, 2024, 4:04pm UTC](https://clarionhub.com/t/pattern-pictures/6909 "2024-01-10T16:04:51Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 10, 2024, 4:04pm UTC](https://clarionhub.com/t/pattern-pictures/6909/1 "2024-01-10T16:04:51Z")

</div>

I think I've already worked out this answer but just want to confirm.  
I'm using a pattern picture for entering phone numbers and had the "brilliant" idea of defaulting an area code when the entry in blank then highlighting the remaining portion for entry using SELECT.  
Doesn't work of course and I'm pretty sure it's because of the pattern picture.  
Am I correct in assuming that there is no way around it using standard Clarion?  
Buying a 3rd party tool isn't worth it for this.

---

<div class="post-metadata">

**Author:** ![seanh](https://clarionhub.com/letter_avatar_proxy/v4/letter/s/4af34b/32.png) [@seanh](https://clarionhub.com/u/seanh)\
**Post date:** [January 11, 2024, 12:20am UTC](https://clarionhub.com/t/pattern-pictures/6909/2 "2024-01-11T00:20:50Z")

</div>

I’m not sure of your question, but I’ve found insisting on a format for phone numbers to be somewhat fraught. Different people and countries have different ideas about what format is correct.  
for example in Australia ph numbers are usually (nn) nnnn nnnn , sometime without the () but mobile numbers are usually formatted as nnnn nnn nnn I personally prefer the first format for everything and get annoyed when forced into the 2nd format  
So my stuff for phone numbers I use s20 and leave it at that

---

<div class="post-metadata">

**Author:** ![greg](https://clarionhub.com/user_avatar/clarionhub.com/greg/32/2771_2.png) [@greg](https://clarionhub.com/u/greg)\
**Post date:** [January 11, 2024, 12:29am UTC](https://clarionhub.com/t/pattern-pictures/6909/3 "2024-01-11T00:29:19Z")

</div>

I gave up on using pattern pictures for phone numbers and other data where I do not control the format, eg postal/zip codes.  
It does make things look nice, but when your customer has a client from another country the number of digits in the phone number may be different.

---

<div class="post-metadata">

**Author:** ![Bruce](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ccd318/32.png) [@Bruce](https://clarionhub.com/u/Bruce)\
**Post date:** [January 11, 2024, 4:32am UTC](https://clarionhub.com/t/pattern-pictures/6909/4 "2024-01-11T04:32:06Z")

</div>

To answer your question jock, you could use 2 entry controls, with IMM set on the first one .

However as others have noted, forced formatting always ends up being a bad idea in the long run.

The short reason why is because sooner or later you come across exceptions to the rule. For phone numbers the obvious exception are “international numbers”. A tourist walks into your shop, a contractor from overseas is employed, and so on.

Phone numbers are “pure data”. Youre not going to do math on them. The person supplying the data should be allowed to enter it anyway they like. They know how to do it correctly, not you.

This is true for names, addresses, phone numbers, id numbers, and so on. Make the fields big. Make them strings.

---

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 11, 2024, 12:40pm UTC](https://clarionhub.com/t/pattern-pictures/6909/5 "2024-01-11T12:40:32Z")

</div>

Oh I get what everyone is saying about formatting phone number etc. In this case however it’s a small bespoke application for one & only one specific client who operates in only 2 Caribbean countries with identical formats.  
If this was intended for general use then no way I’d even consider this.  
It was just a little helper for the data entry and not required or even requested. Since it won’t work, no loss.

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [January 11, 2024, 7:32pm UTC](https://clarionhub.com/t/pattern-pictures/6909/6 "2024-01-11T19:32:32Z")

</div>

Forcing someone to use “Address1”, “Address2”, “Address3” to shoehorn their data is not doing anyone any favors either. I like large multiline address controls. Their city/state/zip (or whatever you call it in your particular region) can all be made consistent with lookup tables. Addresses can be looked up too, but oftentimes the user knows better what should go there, especially in areas where landmarks could be more useful than addresses.

---

<div class="post-metadata">

**Author:** ![Bruce](https://clarionhub.com/letter_avatar_proxy/v4/letter/b/ccd318/32.png) [@Bruce](https://clarionhub.com/u/Bruce)\
**Post date:** [January 12, 2024, 4:24am UTC](https://clarionhub.com/t/pattern-pictures/6909/7 "2024-01-12T04:24:33Z")

</div>

> > however it’s a small bespoke application for one & only one specific client who operates in only 2 Caribbean countries with identical formats.

You forgot to add  
“The company will never change, the countries will never change, and the company will never have a dealing with any individual outside of the countries.”

For 30 years I’ve been dealing with issues in my own software brought about by changing specs, and things that were "never going to happen " happening.

---

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 12, 2024, 12:52pm UTC](https://clarionhub.com/t/pattern-pictures/6909/8 "2024-01-12T12:52:01Z")

</div>

..but in this case this is almost absolutely so and in the very unlikely event that any of that does happen, I won’t be involved. 😄  
Yes I’m well aware of the “never gonna happen” actually happening. It’s been a source of both frustration and sometimes finance in my nearly 40 years of writing code.

But really you guys are overthinking it. What I really wanted to know was if selecting a block in a pattern field was possible. The fact that I was playing with a phone number field was what prompted the question.  
Don’t get hung up on the question of phone or address etc. That was not the question.

---

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 12, 2024, 12:56pm UTC](https://clarionhub.com/t/pattern-pictures/6909/9 "2024-01-12T12:56:26Z")

</div>

Agreed!! That’s not what this was about though.  
The actual question was can SELECT be used to select a block in a pattern picture field. Apparently the answer is no which is fine.

---

<div class="post-metadata">

**Author:** ![Jim-Morgan](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/bc79bd/32.png) [@Jim-Morgan](https://clarionhub.com/u/Jim-Morgan)\
**Post date:** [January 13, 2024, 2:19pm UTC](https://clarionhub.com/t/pattern-pictures/6909/10 "2024-01-13T14:19:29Z")

</div>

Think outside the box. If the Area code never changes… why enter it all? Make the phone number two fields and default the area code to the correct value and use the skip attribute.

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [January 13, 2024, 2:34pm UTC](https://clarionhub.com/t/pattern-pictures/6909/11 "2024-01-13T14:34:45Z")

</div>

In Riverside, we used to be 714, then 909, then 951. And cellular phones could be anything.

---

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 13, 2024, 11:43pm UTC](https://clarionhub.com/t/pattern-pictures/6909/12 "2024-01-13T23:43:32Z")

</div>

Seem like everybody is missing the actual question - can SELECT highlight a block in a field with a pattern. That’s it - that’s all… and the answer is apparently not.  
Everybody is fixated on the whole phone number format thingy which was only used to illustrate the point. It could have been any other pattern but it’s just that example the prompted the query.

---

<div class="post-metadata">

**Author:** ![Mark\_Sarson](https://clarionhub.com/user_avatar/clarionhub.com/mark_sarson/32/6132_2.png) [@Mark\_Sarson](https://clarionhub.com/u/Mark_Sarson)\
**Post date:** [January 14, 2024, 2:04pm UTC](https://clarionhub.com/t/pattern-pictures/6909/13 "2024-01-14T14:04:23Z")

</div>

Hi

I wrote this very simple test and it seems to work if you use `PROP:SelStart` and `PROP:SelEnd`

````auto
  PROGRAM

  MAP
  END
PhoneString STRING(11)

Window WINDOW('Caption'),AT(,,176,88),GRAY,FONT('Segoe UI',9)
                      BUTTON('&Select Entry'),AT(45,26,41,14),USE(?SelectEntry),DEFAULT
                      ENTRY(@p###-###-###p),AT(90,28),USE(PhoneString)
                      BUTTON('&Close'),AT(102,53,42,14),USE(?Close)
                    END
  CODE
  PhoneString = '123000000'
  OPEN(Window)
  ACCEPT
    Case ACCEPTED()
    OF ?Close
      BREAK
    of ?SelectEntry
      SELECT(?PhoneString)
      ?PhoneString{PROP:SelStart} = 5
      ?PhoneString{PROP:SelEnd} = 11
    END
  END
  Close(Window)```

Pressing the button seem to achieve what you are after?

Mark
````

---

<div class="post-metadata">

**Author:** ![Mark\_Sarson](https://clarionhub.com/user_avatar/clarionhub.com/mark_sarson/32/6132_2.png) [@Mark\_Sarson](https://clarionhub.com/u/Mark_Sarson)\
**Post date:** [January 14, 2024, 2:16pm UTC](https://clarionhub.com/t/pattern-pictures/6909/14 "2024-01-14T14:16:36Z")

</div>

In fact it works if you just issue `SELECT(?PhoneString,5,11)`

So I might be missing what you are asking.

Updated example below, including handling when the field is selected by tabbing. I do note it seems to get unselected when you select with the mouse probably because that is placing the cursor.

```auto
  PROGRAM

  MAP
  END
PhoneString STRING(11)

Window WINDOW('Caption'),AT(,,176,88),GRAY,FONT('Segoe UI',9)
                      BUTTON('&Select Entry'),AT(45,26,41,14),USE(?SelectEntry),DEFAULT
                      ENTRY(@p###-###-###p),AT(90,28),USE(PhoneString)
                      BUTTON('&Close'),AT(102,53,42,14),USE(?Close)
                    END
  CODE
  PhoneString = '123000000'
  OPEN(Window)
  ACCEPT
    Case ACCEPTED()
    OF ?Close
      BREAK
    of ?SelectEntry
      SELECT(?PhoneString,5,11)
    END
    
    Case Event()
    OF EVENT:Selected
      Case SELECTED()
      OF ?PhoneString
        SELECT(?PhoneString,5,11)
      END
    END
    
      
  END
  Close(Window)

```

---

<div class="post-metadata">

**Author:** ![Jock](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e68b1a/32.png) [@Jock](https://clarionhub.com/u/Jock)\
**Post date:** [January 14, 2024, 4:02pm UTC](https://clarionhub.com/t/pattern-pictures/6909/15 "2024-01-14T16:02:53Z")

</div>

Hi Mark, that’s the behaviour I expected but it didn’t work, hence the question. Thought it was rather odd.  
Maybe I’ll just try different pattern just to see if it’s that particular pattern that was the issue.  
Thanks for the input even though I’ve decided not to bother in this case as it was merely an idea I had rather than a requirement.

---

<div class="post-metadata">

**Author:** ![xxetfxx](https://clarionhub.com/user_avatar/clarionhub.com/xxetfxx/32/5215_2.png) [@xxetfxx](https://clarionhub.com/u/xxetfxx)\
**Post date:** [October 23, 2026, 8:55am UTC](https://clarionhub.com/t/pattern-pictures/6909/16 "2026-10-23T08:55:36Z")

</div>

Sorry for re-opening this thread, I am also quite curious about this question though, as we have been trying to apply this on both touchscreen based and mouse+keyboard based workstations. one-tap or one-clicking the entry should highlight all the values in the entry field.  
Sample:  
 ![image](https://clarionhub-uploads.s3.dualstack.eu-north-1.amazonaws.com/original/2X/f/f84e63ab506b048bc2adad34d13be6fc2b6a6cc6.png)  
when tapped or clicked on the entry it should automatically highlight the values. prop:mask on window and entrymode property couldn't helped though
