Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Button Styling on Select CSS

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Button Styling on Select CSS

    I spent an absurd amount of time on this, so in the interest of helping someone else who is at my mortal level should they do a search on the forum, I am posting this up.
    I am sure most of the time was me having to struggle and learn the CSS local style tweaks. I have avoided CSS like the plague, but in order to get my app to not look circa 1985, I am giving it a go.

    Video below shows the end product and what I was trying to achieve. I built a menu within a UX, that is driving different panels into view on a navigator. I played with a tabbed navigator, but found the UI too cluttered and simply
    too many tabs going on. So I decided since users are used to outlook, I would go for something along those lines with buttons on left, content on right.
    Once I got it working, I realized there was no clear indication to the user of which screen they were on. I added headings into the control bar layout for each panel, but I did'nt care for it.
    So I decided that having the buttons tell the user which one is selected was the way to go. I played with small icons and finally settled on a translucent color. May change it, but you get the idea.

    My difficulty was figuring out which style to apply and which controls each part of the button element. It was about hour 5 that I coughed up my stupid burger and used dev tools to inspect the element. Thats what led to actually
    using a local css to overwrite. Add a few more hours for me playing with CSS and dev tools to see which style was overwriting my changes and a few more mins for slamming head on desk.

    Code is below for how this is driven, should someone do a search like I did and was still unable to figure it out, even with 400 posts about buttons.
    If you are reading this, decent odds that someone with more skill than me has replied with a wayyy simpler way to do it than I did :)
    I am genuinely interested from some of the pros here if there was a more efficient way for me to tackle this. Being when one button is selected, disengage the others with custom styling.

    Thanks

    Wayne

    https://app.screencast.com/D0T7Oz4bqbB5I

    Code:
    Button on select:
    
    setButtonSelected('BTN_JOBHOME','PL_JOBINFO');
    
    
    JS Functions:
    
    function setButtonSelected(Object, PANEL) {
    //console.log("setButtonSelected called with:", Object);
    //Lets go there first
    var pObj = {dialog.object}.panelGet(PANEL,true);
    pObj.show = true;
    var pObj2 = {dialog.object}.panelGet('PN_PRIMARYMAIN');
    pObj2.refresh();
    {dialog.object}.panelSetActive(PANEL,true);
    
    
    // Go through and clear buttons and then highlight one just pressed
    const buttonIds = [
    'BTN_JOBHOME', 'BTN_PARTS', 'BTN_NOTES', 'BTN_CHANGEORDERS', 'BTN_DRAWINGS',
    'BTN_DOCUMENTS', 'BTN_FINANCE', 'BTN_SCHEDULE', 'BTN_PURCHASEORDERS', 'BTN_COPYPARTS', 'BTN_LABOR'
    ];
    
    for (let id of buttonIds) {
    //console.log("Unselecting:", id);
    setButtonsUnSelected(id);
    }
    
    // Delay applying new styles to the selected button to let the JS have time to fire
    setTimeout(function() {
    //console.log("Setting selected for:", Object);
    let ele = {dialog.object}.getPointer(Object);
    if (ele) {
    //console.log("Element found:", Object);
    ele.style.backgroundColor = "rgba(0, 90, 166, 0.20)";
    ele.style.border = ".1px solid rgba(0, 90, 166, 0.10)";
    ele.style.borderRadius = "7px";
    } else {
    console.log("Element not found:", Object);
    }
    
    }, 175);
    }
    
    function setButtonsUnSelected(id) {
    //console.log("setButtonsUnSelected called with:", id);
    let ele = {dialog.object}.getPointer(id);
    if (ele) {
    //console.log("Element found:", id);
    ele.style.border = "none";
    ele.style.backgroundColor = "rgba(0, 0, 0, 0.00)";
    } else {
    console.log("Element not found:", id);
    }
    }
    
    Here is the CSS:
    .iconSizeablex {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    }
    
    .WaynesLabelClassx {
    font-size: 11px;
    color: #717171;
    
    }


    Screen.pngButton Properties.png
    Attached Files

    #2
    Nice work.

    Comment


      #3
      Wayne - Thanks for doing this Wayne. I too could not find any help on the subject until stumbling on your post.
      The code works! Thanks for doing that!

      I also stumbled upon a control bar feature which seems to do the same thing.
      Here is a video link tutorial from Alpha https://www.viddler.com/v/c1b94486 .
      If the link ever breaks, go here https://documentation.alphasoftware....%20Control.xml
      or search "The ControlBar Control" within Alpha's documentation search. The video can be found under subheading "Adding a Button-List to a ControlBar".

      Hopefully this can help someone out.

      Comment


        #4
        a tree menu control automatically works the way you wanted and would look identical without any styling - either way, excellent work on that - it's a great tidbit of info especially if I wanted to go in and just "style" an existing UX rather than rebuild the menu with a tree control - so thanks for posting! appreciate your contribution
        NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

        Comment


          #5
          Nice Job - very special class as well.
          .WaynesLabelClassx {
          font-size: 11px;
          color: #717171;
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment

          Working...
          X