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

How do I use buttonlist to activate panels, and how to I resize the buttonlist control

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

    How do I use buttonlist to activate panels, and how to I resize the buttonlist control

    I have a bunch of panels in my mobile app. I want to put a buttonlist in one panel that I can then use to activate other panels.

    I have two questions:

    1. When a button in the buttonlist is clicked, how do I determine in the javascript click -event which button was clicked. I need to know that because I need to activate different panels based on which button was clicked.

    2. I need to restrict the horizontal size of my buttonlist to fit in the mobile screen. How do I go about doing that?


    Thanks!

    #2
    Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

    Any reason you are using a button list control instead of just a list of buttons?

    Anyway,
    putting this:
    Code:
    this.value
    //you can try the below for testing
    alert(this.value);
    in the onClick event for the list will get you the value (which you would have set in you button list definition) of the particular button that was clicked.


    As far as the sizing, I'm not the greatest at that, but you could adjust the width to 100%. That should only go as big as your screen then.

    Comment


      #3
      Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

      Excellent, thanks! Of course that's the best way to find out what the returned value is. I'm just too used to full-fledged debuggers to even think of print statements. But it works.

      I like the buttonlist over buttons, because it has a more modern look and no space padding the buttons. Still messing around with sizing in order to get 5 buttons crammed in there...


      Pertti

      Originally posted by -Jinx- View Post
      Any reason you are using a button list control instead of just a list of buttons?

      Anyway,
      putting this:
      Code:
      this.value
      //you can try the below for testing
      alert(this.value);
      in the onClick event for the list will get you the value (which you would have set in you button list definition) of the particular button that was clicked.


      As far as the sizing, I'm not the greatest at that, but you could adjust the width to 100%. That should only go as big as your screen then.

      Comment


        #4
        Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

        Originally posted by nlights View Post
        Excellent, thanks! Of course that's the best way to find out what the returned value is. I'm just too used to full-fledged debuggers to even think of print statements. But it works.

        I like the buttonlist over buttons, because it has a more modern look and no space padding the buttons. Still messing around with sizing in order to get 5 buttons crammed in there...


        Pertti
        That makes sense. More so, now that I actually look at it and see how snazzy it looks.

        Oh, and just an fyi, as I was messing with this, I noticed that the value being returned by this.value was coming back as something not recognized by a case statment so if you are using that to switch your panels, convert it to a number first.

        Code:
        var btval = Number(this.value)
        
        var pnl;
        switch (btval) {
        case 1:
            pnl = 'MYPANELCARD1';
            break;
        case 2:
            pnl = 'MYPANELCARD2';
            break;
        case 3:
            pnl = 'MYPANELCARD3';
            break;
        }
        
        //alert(pnl +' '+ btval);
        
        {dialog.object}.panelSetActive(pnl);
        P.S. Unfortunately, I have no fancy debuggers, so alerts for me!

        Are there any good free ones out there for Javascript?

        Comment


          #5
          Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

          It does look pretty snazzy, doesn't it...

          Good idea about using numbers with this control. Not as self documenting as text, but programmatically more efficient for sure.

          I noticed that I can reduce the size of this control by setting the button inline style to a small font size, such as 15px. I'm sure UI/UX experts would jump all over me for doing that, since it probably makes the buttons too small and close together and the user interface too error-prone.

          I wonder about another control in mobile: Checkbox. It sure looks pretty dinky, and I don't seem to be able to resize it. Might have to use unchecked and checked box icons for that.

          As for debuggers, I use Firebug for Firefox, and it is pretty good. But it doesn't work in Working Preview, which makes it a bit of a hassle.



          Originally posted by -Jinx- View Post
          That makes sense. More so, now that I actually look at it and see how snazzy it looks.

          Oh, and just an fyi, as I was messing with this, I noticed that the value being returned by this.value was coming back as something not recognized by a case statment so if you are using that to switch your panels, convert it to a number first.

          Code:
          var btval = Number(this.value)
          
          var pnl;
          switch (btval) {
          case 1:
              pnl = 'MYPANELCARD1';
              break;
          case 2:
              pnl = 'MYPANELCARD2';
              break;
          case 3:
              pnl = 'MYPANELCARD3';
              break;
          }
          
          //alert(pnl +' '+ btval);
          
          {dialog.object}.panelSetActive(pnl);
          P.S. Unfortunately, I have no fancy debuggers, so alerts for me!

          Are there any good free ones out there for Javascript?

          Comment


            #6
            Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

            I do use firebug but like you said, no go in working preview. I thought maybe you were using something "snazzier".

            I hate checkboxes. I can NEVER get them to render where I want them. The only way they ever work well for me is when I check the option to "render as a button list" and then you've pretty much got what you already have except you can populate it dynamically more easily.

            Comment


              #7
              Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

              Perti - You can customize the checkbox image and make it any size you want by checking the "Has custom design for Checkbox appearance". This will reveal a Custom appearance designer. It takes some work aligning the checkbox properly if you are trying to make a logical checkbox where the checkbox is on the left and the text is on the right but left justified. You just have to play with the control width and the label width long enough.

              As for your button list, are you putting the button list inside of a panel card footer and using them for navigation? ButtonList.JPG

              Comment


                #8
                Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

                Dave --

                Thank you for your input. I'll check out the checkbox appearance option -- I didn't notice it in the property sheets. Good stuff.

                Button list -- I was putting it inside a panel card itself, because it is context sensitive (some cards have different options than others.) Upon further reflection, I decided to dump the button list control and use the "slide out" -menus that can be activated from the menu button on top of the screen, because that saves precious real estate on the small screen. But your screenshot looks very polished, and I'll keep it in mind if I ever need something like that.

                Comment


                  #9
                  Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

                  Perti - Yes, I use the sliding menus myself for the same reason. I created the above navigation button example for someone else before Alpha introduced icon fonts. I just grabbed some random icons. That's why the icon images do not match the text underneath. With the icon font libraries, its so much easier to find decent looking icons. The fact that you can resize, change the color and add 3D effects to icon fonts makes them so powerful. I don't know why I am going on about icon fonts.

                  Comment


                    #10
                    Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

                    Originally posted by DaveF View Post
                    Perti - Yes, I use the sliding menus myself for the same reason. I created the above navigation button example for someone else before Alpha introduced icon fonts. I just grabbed some random icons. That's why the icon images do not match the text underneath. With the icon font libraries, its so much easier to find decent looking icons. The fact that you can resize, change the color and add 3D effects to icon fonts makes them so powerful. I don't know why I am going on about icon fonts.


                    I, too, like the icon fonts. I wonder how easy it would be to roll some on your own. I assume there must be some icon font editors out there... wait a sec...... OK, I'm back from GoogleLand. http://www.webdesignerdepot.com/2012...-icon-webfont/ has a good discussion on this. Not that I would want to make my own fonts since I'm not a designer (and consequently my font family would most most likely be called "Crappy." But if I wanted to, I could hire a designer for this task. Enough of icon fonts already...

                    Comment


                      #11
                      Re: How do I use buttonlist to activate panels, and how to I resize the buttonlist control

                      Check out http://icomoon.io. This is where you can go to build your own custom icon font libraries. Their app lets you pick and choose which fonts you want to add to a library. You can also import svg images and it will convert them to an icon font. Click on the red "IcoMoon App" button in the upper right corner to launch the app.

                      Comment

                      Working...
                      X