Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ColorPickerItem Text

    SmartClient Version: v8.2p_2012-04-26/PowerEdition Deployment (built 2012-04-26)

    Firefox 7/Win 7

    Is it possible to remove the text input area from a ColorPickerItem? Or can I set a property on the ColorPicker so that it displays only one swatch? I am trying to place a colorpicker in a custom listgrid so that users can pick a color for an item, however I don't want the text input to show in the listgrid cell.

    I looked through the docs, but I couldn't find anything that looked like this property. Apologies if I overlooked it.

    Thanks,

    #2
    We don't currently have this as a setting on the ColorItem.
    You could create your own custom CanvasItem that behaves this way by launching a ColorPicker widget when clicked and storing the value from it - would that work for you?

    Comment


      #3
      It's not the value that I'm worried about. I just want to hide the textbox next to the color swatch in the ColorPickerItem. The text item next to it takes up a lot of space that I would like to recover by hiding/removing it. I tried setting the width of the colorpickeritem instance to several different setttings, and it seems that 22 makes the text input almost disappear, however any other setting shows the textinput at full size.

      Thanks,

      Comment


        #4
        Changing the width will reduce the size of the text box, but will not make it disappear altogether, as you have found.

        As we said we don't currently have this in place as a feature. If you'd be interested in having us add it for you, let us know and we can look into what's involved.

        Otherwise you could take the approach of building your own custom CanvasItem subclass as suggested above.

        Comment


          #5
          Note that having reduced the normal ColorItem to a minimal width, you can modify the textBoxStyle to hide the border around the text input and set the text color match the background color - this will make it invisible.

          Comment


            #6
            Interestingly enough the textbox can be minimized quite a bit by setting its width to 22, e.g. colorPickerItem.setWidth(22);. However any other number does not work for this at all, at least for my use case, which is an item in a listgrid. It will show the textboxitem at full width.

            Additionally, which exact style attribute would I be setting (example)?

            And what did you mean in your previous post when you said you'd add the capability to remove the textbox? Would that be a sponsored item or part of a wishlist request, because it would be nice to have for sure.

            Thanks,

            Comment


              #7
              The property to control the CSS style is literally textBoxStyle as mentioned in the last post - this is inherited from FormItem.

              As far as sponsorship, what we would do is add a new explicit setting to get rid of the text input area so you don't have to do it via minimizing width plus CSS.

              Comment


                #8
                FormItem.setShowValueIconOnly() gets rid of the text box but the changed event doesn't happen. If Isomorphic would process the event after the color is changed when the textfield is absent, it would solve the problem. I too need this functionality.

                Comment


                  #9
                  i also need this feature any one found a work around to this issue ?

                  Comment


                    #10
                    setShowInputElement(false);
                    using this method does not shows the textbox.

                    Comment

                    Working...
                    X