Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Can I use hyperlink on column header if column has checkboxes?

I am trying to set up a Report Table with column 1 having check boxes, but turning the header into a hyperlink that can be used to cause all rows of the table to be selected (via firing the CheckAll event). I have set up the table with both checkbox and hyperlink turned on for column 1, and also tried "Set_Property(@Window:".OLE_PALLET_RPT", "OLE.ItemHyperlink[1;0]", 1)". But the OnItemHyperlink event doesn't fire. Is it possible to get the column 1 header to be a hyperlink? If not, do I have any other alternatives besides using the OnHeaderRightClick event?
«1

Comments

  • It is currently not possible to put a hyperlink in the header for the Report Table control.

    When I create a column with both check boxes and hyperlinks, I get the OnItemHyperlink event.
  • Hi Kevin.
    Do any other events besides OnHeaderRightClick, fire when you click on the header row?
    Thanks,
    Roger
  • Sadly, no. This control is a 3rd party control meant for a specific use case: to display information. It wasn't designed with much interaction in mind.
  • Roger - This is one of those trade-offs between the EditTable and the ReportTable. If you want to keep using the ReportTable, you might consider using the OnHeaderRightClick and a context-menu. Context menu support is a built-in feature of the ReportTable.
  • Hi Kevin or Don. Does the ReportTable allow for an image in one of the header columns? My reading of the properties tells me no, but I would like to confirm that. Thanks.
  • No, it doesn't, but we've gotten around this using icon fonts.
  • Kevin. What do you mean exactly?
  • Windows has fonts like this one that have icons in them instead of letters and numbers.
  • Does that mean I can make the column 1 header cell have an icon by using the ColumnHeaderFont property? If so, can you provide me an example of this? Thanks.
  • edited November 12
    Here's some code I wrote to change a column's header to the Wifi icon:

    Set_Property(@Window:".OLE_REPORT", "OLE.ColumnHeaderFont[5]", "Segoe MDL2 Assets") Set_Property(@Window:".OLE_REPORT", "OLE.ColumnHeaderText[5]", \EE9C81\)

    This only works if OI's UTF8 Character Mode is enabled. The \EE9C81\ you see above is the UTF8 sequence for that icon. I found it by first using Microsoft's documentation for the Segoe MDL2 Assets font here. If you scroll down, you'll find that the Unicode value of the Wifi icon is E701. However, we can't use Unicode in OI directly, we have to use UTF8.

    There are tools online, such as this one, that let you convert from a Unicode codepoint to a UTF8 one. I typed E701 in the top box and pressed Go. You'll see "Hex UTF-8 bytes" listed below that. In this case, it displays "EE 9C 81". Remove those spaces and place them between backslashes in OI, and viola, you have your Unicode icon.

    Hope this helps.
  • Kevin. I turned on UTF8 character mode in my application, entered e73a (for CheckboxComposite) into that site you referenced, set the properties as suggested, with ColumnHeaderText = \EE9C80\, but the results as seen in the attached image, do not look like the desired icon. Any thoughts?
  • Does your computer have the Segoe MDL2 Assets font?
  • I just retried the conversion site, leaving the default radio selection of hex code point. That resulted in \EE9CBA\ for ColumnHeaderText, but no change in the results when viewing the Report Table.
  • I turned on UTF8 character mode in my application

    and you did that using what method?

    Are you in OI9 or Oi10?
  • Reason for my previous question (forget about if 9 or 10), was that if you were not using utf8 prevoiusly and have just turned it on in your application settings, then my gut is telling me that I have seen forum reported issues where it can affect the running of your application if you dont make related changes elsewhere - could be wrong.

    So, my safer suggestion (I have no experience with this) is to set/unset in the related proc.

    Prior to use:
    Call Set_Property( "SYSTEM", "UTF8", TRUE$ )

    Post use:
    Call Set_Property( "SYSTEM", "UTF8", FALSE$ )
  • Don, I am using Windows 11 which is supposed to have this font.

    Barry, I am using the application properties to set UTF8. I tried your suggestion on the SYSTEM UTF8 properties calls, with no affect on the problem.
  • Window 11 !!

    This might help then
    With the release of Windows 11, the Segoe Fluent Icons font replaced Segoe MDL2 Assets as the recommended symbol icon font. Segoe MDL2 Assets is still available, but we recommend updating your app to use the Segoe Fluent Icons font.
  • Barry, I am using the application properties to set UTF8. I tried your suggestion on the SYSTEM UTF8 properties calls, with no affect on the problem.


    Was not a fix, just a tip
  • Can we see your related code please
  • I tried changing the ColumnHeaderFont from "Segoe MDL2 Assets" to "Segoe Fluent Icons" and I now see the attached for my column heading. My specific code is:
    Set_Property(@Window:".OLE_PALLET_RPT", "OLE.ColumnHeaderFont[1]", "Segoe Fluent Icons")
    Set_Property(@Window:".OLE_PALLET_RPT", "OLE.ColumnHeaderText[1]", \EE9CBA\)
  • Without doing a deep dive, my first instinct is that UTF8 is not enabled.
  • Does that involve anything beyond setting the check box in Application Properties?
  • I assume you have logged out/in since setting
  • Roger - I don't have Windows 11 to test with so I'm using Windows 10 and Segoe MDL2 Assets. Using the hex value that Kevin originally posted I'm able to see the wifi icon:

    I would have expected setting the application properties to turn on UTF8 mode to have worked but maybe something else is turning it off during runtime. Why don't you try the Set_Property method that Barry showed you and see if that works better. If I do not turn on UTF8 mode, I see similar characters you are seeing, which corroborates my theory.
  • Don - I added a Get_Property( "SYSTEM", "UTF8") to the create event on my window, after it sets up the report table, and it shows a value of true.
  • Again, try the Set_Property anyway just to rule it out or in. Also, set it just prior to your OLE.ColumnHeaderText setting.
  • I just did that, but it made no difference.
  • Thanks. In that case I'm out of ideas. It might be something obvious, but we aren't seeing the issue because of limited information.
  • Could it have anything to do with the fact that I have the check box setting on for that column?
Sign In or Register to comment.