putting a frame around element of a scale object

PennController for IBEX Forums Support putting a frame around element of a scale object

This topic contains 5 replies, has 2 voices, and was last updated by Avatar robpetrosino 6 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3661
    Avatar
    robpetrosino
    Participant

    I would like to put a frame around the element of a Scale object. I am assuming that this could be done by calling the appropriate CSS command within the PennController object, but I can’t seem to get it right. I tried to do the following:

    `
    newScale(“scale”, 7)
    […]
    .settings.cssContainer(“border-style”, “solid”)
    `

    but it does not work. I guess that the question may be more generally phrased: where can one access the commands that can be referred to within the setting.cssContainer command?

    Thanks!

    #3664
    Jeremy
    Jeremy
    Keymaster

    Hi again,

    The command .settings.cssContainer will not affect the elements within the container, but indeed the container itself. Using newScale(7).settings.cssContainter("border-style","solid 1px black") will only add a black border around the whole Scale element, not around the scale’s buttons.

    For you to modify the scale’s buttons, you need to upload a file named PennController.css under css_includes with the right target, e.g.

    td.PennController-Scale-scaleButton {
      padding:10 15 10 15;
      color:blue;
      border:1px solid gray;
    }
    #3672
    Avatar
    robpetrosino
    Participant

    Hi Jeremy,

    thanks, this makes sense. I created a the PennController.css with the code you suggested and uploaded it under css_includes, but it did not have any effect on the aesthetics of the scale buttons. (I have already encountered this problem before, around a couple of months ago, when I was trying to modify the aesthetics of a text object).

    #3673
    Avatar
    robpetrosino
    Participant

    I think I found a solution for this – I had to prepend global_ to the name of the css file (i.e., global_PennController.css), as suggested in the IBEX tutorial. I am not sure why it is like that, but it might be good for you to know, in case you want to find out/fix it…

    #3674
    Jeremy
    Jeremy
    Keymaster

    Ah, right, my bad, you probably want to remove PennController- between td. and Scale if you are going to use a file named PennController.css (though Ibex’s automatic class prefixation is a little bit shaky, so the global_ method is safe).

    #3675
    Avatar
    robpetrosino
    Participant

    Sounds good! Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.