# Changing the "Outline" of the Selected Browse Cell

**URL:** <https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456>\
**Category:** questions\
**Tags:** browse, eip\
**Created:** [September 12, 2024, 2:48pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456 "2024-09-12T14:48:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 12, 2024, 2:48pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/1 "2024-09-12T14:48:36Z")

</div>

I'm trying to make an updatable browse (1st image) look and behave some what like an Excel workbook (2nd image). Specifically, I want the selected cell to look more like it does in Excel. This means changing the dotted line to solid and maybe making it more solid. I imagine if it's available, it would be in some property setting. Any ideas on how to do that, anyone?  
 ![2024-09-12_10-36-38](https://clarionhub.com/images/transparent.png)  
 ![2024-09-12_10-43-10](https://clarionhub.com/images/transparent.png)

---

<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:** [September 12, 2024, 2:59pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/2 "2024-09-12T14:59:19Z")

</div>

PROP:BarFrame might help a bit, but I don’t think it affects the thickness.

> PROPSTYLE:BarFrame
> 
> An array property that sets or returns the selected bar frame color for the style number specifed as the array element.
> 
> ?List{PROPSTYLE:BarFrame, 1} = COLOR:Blue
> 
> If PROPSTYLE:BarFrame is set for a style where the default frame color is not set, the runtime library uses one on the base selection bar’s background color.
> 
> If the barframe color matches the selection bar color, the focus rectangle is not drawn if the list box has focus

---

<div class="post-metadata">

**Author:** ![Flavio\_Suarez](https://clarionhub.com/user_avatar/clarionhub.com/flavio_suarez/32/1347_2.png) [@Flavio\_Suarez](https://clarionhub.com/u/Flavio_Suarez)\
**Post date:** [September 12, 2024, 3:20pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/3 "2024-09-12T15:20:20Z")

</div>

Not what you asked for, but you can change the LIST behavior from row selection to cell/column selection…

---

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 12, 2024, 3:41pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/4 "2024-09-12T15:41:01Z")

</div>

> [@jslarve](#):
>
> PROPSTYLE:BarFrame

That almost worked, Jeff. Made it all the way around the cell until it hit the bottom. 🙃  
 ![2024-09-12_11-39-27](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/9/973718b44d7c5f9cc8c77505f066dcea2b750b33.jpeg)

---

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 12, 2024, 3:45pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/5 "2024-09-12T15:45:23Z")

</div>

The underline overrides the barframe. If I turn the underline off, then I get a fully encompassed cell.

---

<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:** [September 12, 2024, 4:24pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/6 "2024-09-12T16:24:03Z")

</div>

What if you hop on one foot? 🙂

---

<div class="post-metadata">

**Author:** ![lodestar](https://clarionhub.com/user_avatar/clarionhub.com/lodestar/32/1055_2.png) [@lodestar](https://clarionhub.com/u/lodestar)\
**Post date:** [September 12, 2024, 5:16pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/7 "2024-09-12T17:16:27Z")

</div>

Personally, I fall down and scream… but that’s just me! 🤣

---

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 13, 2024, 3:17pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/8 "2024-09-13T15:17:23Z")

</div>

Well…I decided to try to “draw” the bottom line. First, I tried a BOX control, but the z-order kept it hidden. Then I tried a REGION, which worked well, except it caught all the click events. Same problem as the BOX for a LINE. So I finally did a REGION with a height of 1 positioned at the bottom of the cell, which works. I figure if I want bolder lines, I could do 4 REGIONs bordering the cell.

![2024-09-13_11-07-52](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/b/b44b761e4ce07925efd9970df46f692eecb643a7.jpeg)

---

<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:** [September 13, 2024, 5:19pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/9 "2024-09-13T17:19:37Z")

</div>

If this is a browse procedure, I wonder if exploiting the built-in EIP functionality would allow you to accomplish your goal in a way that’s more maintainable. Like maybe setting the created ENTRY control as readonly, and figuring out an auto-edit mode when the window opens. But prevent it from writing.

Could be done with a normal listbox too, but more work.

---

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 13, 2024, 5:42pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/10 "2024-09-13T17:42:02Z")

</div>

Well, it is an EIP browse, and I am leveraging the EIP control to set the position of the region. I temporarily set the edit control for the cell to be that of the region and then I capture the position, height, and width. Then I turn off the edit control and calculate the bottom line from the positional parameters of the region and alter it accordingly. The code below gets executed on a NewSelection event and a couple of others.

```auto
  IF ?List{PROP:Column} > 0 THEN
    IF boxfeq = 0 THEN
      boxfeq = CREATE(0, CREATE:REGION)
      boxfeq{PROP:Color} = COLOR:Green
      boxfeq{PROP:fill} = COLOR:Green
      boxfeq{PROP:LineWidth} = 9 ! doesnt do anything for a region
    END
    UNHIDE(boxfeq)                 
    P# = target{PROP:Pixels}
    target{PROP:Pixels} = true
    ?LIST{PROP:Edit, ?List{PROP:Column}} = boxfeq
    ?LIST{PROP:Edit, ?List{PROP:Column}} = 0
    SETPOSITION(boxfeq, boxfeq{PROP:Xpos} + ?List{PROP:Xpos}, boxfeq{PROP:ypos} + ?List{PROP:ypos} + boxfeq{PROP:height}, boxfeq{PROP:Width}, 2)
    target{PROP:Pixels} = P#
    UNHIDE(boxfeq)                 
    ?List{PROPLIST:BarFrame} = COLOR:Green
  END

```

No judging. It hasn’t been cleaned up yet.

---

<div class="post-metadata">

**Author:** ![ChrisHargett](https://clarionhub.com/user_avatar/clarionhub.com/chrishargett/32/2413_2.png) [@ChrisHargett](https://clarionhub.com/u/ChrisHargett)\
**Post date:** [September 13, 2024, 6:10pm UTC](https://clarionhub.com/t/changing-the-outline-of-the-selected-browse-cell/7456/11 "2024-09-13T18:10:10Z")

</div>

That code should work ok with a non-EIP browse. Here’s a little demo of it. There are two anomalies. If the window loses focus and then gains focus or is resized, the region disappears. That’s easily fixed by trapping on those events. The other anomaly, which you can see in the demo, is when you click on a cell and then drag it to another cell. The NewSelection event doesn’t happen until MouseUp, so the region isn’t moved until then. That’s minor.  
 ![2024-09-13_14-03-33](https://clarionhub-uploads.s3.eu-north-1.amazonaws.com/original/2X/d/d1269136fbca063fe51bb815ffae86428b1d5e64.gif)
