Announcement

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

    How eliminate ':' from the TextItem

    Hi,

    If the title for a TextItem is set, SmartClient will automatically append ':' between the label and the input box.

    Is there a way to avoid having the column between the title and the input box?

    Thank you!

    #2
    The answer is simple.

    My TextItem is inside a DynamicForm, which by default has 'setTitleSuffix' set to ':'.

    Thus, the solution is: myDynamicForm.setTitleSuffix(""); . This will eliminate the ':'. If one wishes to append a space between the title and the input box to make it prettier, the command will look like myDynamicForm.setTitleSuffix(" ");


    Best regards

    Comment


      #3
      Thanks for the info.

      Other questions I have on Text Item styling:

      1) Is there a way to have a different styling to the Title and Text Box input text configurable through js or css file. I want to avoid using setTitleStyle each and every time I create a TextItem. Also I would like to avoid creating new Java wrapper classes as much as possible.

      2) Required Field Marker - I didn't find anything in the API's by which you can tell the user that a Text Item is mandatory to be filled. Is this supported at all.

      3) Also any specific property to customize the minimum spacing between end of Text Item title and the start of Text Box.


      Thanks.

      Comment


        #4
        What approach are you using to find APIs? If you had search for "required", you'd find #2. #1 is answered by the Skinning Guide, #3 is just CSS settings.

        Comment


          #5
          Thanks for the info.

          For #1 i tried setting the following property 'titleClassName' to mention a new css class 'titleStyle' to be used for styling title for textitem. I defined that class in skin_styles.css file and two other styles 'titleStyleFocused' and 'titleStyleDisabled'. It picks up css for title appropriately for normal . But when I disable a TextItem its style is not picked from 'titleStyleDisabled' rather uses 'titleStyle, only.

          Also as u mentioned what is the skinning guide. Is it the same Widget guide.

          And for #2 I looked at the API for TextItem, hence couldn't figure that out. It's a setting at Form level.

          And for #3, its a lame question.

          I'm finding it difficult to style a Window with custom edges etc. also the edges, edgeoffset etc are confusing. No description to any of the properties in the widget guide too. Any reference would be helpful.

          Thanks.

          Comment


            #6
            What "Widget guide" are you talking about?

            The Skinning Guide is here. The QuickStart Guide refers you here.

            Your CSS styles sound fine, but note that "titleStyle" happens to be a CSS style name used by other components. It's good practice to use an organization-specific prefix for your custom styles.

            edgeOffset et al have pretty extensive docs - seriously where have you been looking for docs??

            Comment


              #7
              Resources i'm using:

              1) Quick Start Guide - info to setup custom company specific themes etc.
              2) WidgetGuide present in the doc folder of the downloaded zip file - for info on specific properties that can be changed in load_skin.js file.
              3) Skinning Guide, URL u have just given.

              thanks.

              Comment


                #8
                As mentioned in the other thread, the order should be:

                1. QuickStart Guide
                2. JavaDoc

                Comment

                Working...
                X