Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum Transbutton hotbutton currentindicatorcolor properties

  • Transbutton hotbutton currentindicatorcolor properties

    Posted by Obonye on March 13, 2025 at 7:59 pm

    Hello everyone,

    I’m looking for a component object or a control to hover a button and it gets highlighted with an underline as shown in the image attachment. I had in mind the transbutton. But its hotcolor property highlights the whole button. When the button becomes hot, its bordercolor property should be highlighted at the bottom the same way currenttabindicatorcolor of a tabcontrol object does as shown in the image attachment. Please note this is for javascript remote forms.

    Regards, Martin.

    Obonye replied 4 months ago 2 Members · 9 Replies
  • 9 Replies
  • Obonye

    Member
    March 14, 2025 at 7:49 am

    OR, asked differently, the Transbutton has a border color property. Is there a way to add the button’s top border, bottom border, left border, and right border properties?

  • Andreas Pfeiffer

    Administrator
    March 26, 2025 at 9:08 am

    Hi Martin,

    You can achieve this with a CSS class.

    Add the following to the user.css within your installation:

    .mytransbutton:hover {

    border-bottom-width: 3px !important;

    border-bottom-color: darkblue !important;

    }

    Then add the name of this CSS class “mytransbutton” to the $cssclass property of your transbutton.

    When testing this, the transbutton should show a 3px, dark blue border at the bottom when hovering with the mouse.

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    March 27, 2025 at 10:07 am

    Martin,

    We found a little glitch with this approach. Apparently when adding the bottom border, the text on the button jumps a little. So instead using a CSS class for the button we use a container (i.e.scroll box) and put the button or trans button into that container given it an edge float kEFPosnClient. Note that it does not look nice if the button has rounded corners. Hence we set $borderradius to zero for both the button and the container.

    Now the container will receive a CSS class like this:

    .showbottomborder:hover {
    border-bottom: 3px solid red;
    }

    If you put “showbuttomborder” into $cssclassname (without the quotes) it will show a 3px, solid and red line at the bottom when hovering with the mouse without affecting the button itself.

    Kudos to Maurin for this.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    April 14, 2025 at 8:23 am

    Martin,

    Attached please find the test library made with Omnis Studio 11.1 CE and the required user.css that you would need to copy into your installation. If you have already contents in the user.css then you can simply copy the CSS class from this user.css into your own user.css.

    Best,

    Andreas

    • Obonye

      Member
      April 14, 2025 at 1:10 pm

      Hi Andreas,

      Still no luck! Please see the video clip. I have copied the css file into the folder C:\Users\info\AppData\Local\Omnis Software\OS 11.1 37255\html\css

      Regards, Martin.

      • Andreas Pfeiffer

        Administrator
        April 14, 2025 at 5:52 pm

        Martin,

        Maybe you might try this with the latest version though. I was using Build 37266

        Best,

        Andreas

        • Obonye

          Member
          April 15, 2025 at 8:19 am

          Hi Andreas,

          You mean it’s time to upgrade to the latest $OS version.

          Thank you for the help and I’ll do the needful.

          Regards,

          Martin.

Log in to reply.