Announcement

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

    #16
    This is not working for DateItems. The hover only appears when the mouse is on top of the icon, but not on top of the field (like the rest of the FormItems, e.g. TextItem).

    Code:
    public void onModuleLoad() {
    
    		DynamicForm testForm = new DynamicForm();
    
    		DateItem testItem = new DateItem();
    		testItem.setShowTitle(false);
    		testItem.setHoverWidth(200);
    		testItem.setUseTextField(true);
    		testItem.setUseMask(true);
    		testItem.setItemHoverFormatter(new FormItemHoverFormatter() {
    
    			@Override
    			public String getHoverHTML(FormItem item, DynamicForm form) {
    				return "<b>THIS</b> is some custom HTML";
    			}
    		});
    		// borrow a style from ListGrid cells...
    		testItem.setHoverStyle("cellOver");
    
    		testForm.setItems(testItem);
    		testForm.setBorder("1px solid black");
    		testForm.draw();
    	}

    Comment


      #17
      You said previously you only needed this support for StaticTextItems used as labels? For other items, just use the normal hover APIs on FormItem.

      Comment


        #18
        No, I have never said that I am using StaticTextItems, nor that I need the hovers for StaticTextItems. In order to explain the situation, I explained that I use Labels (NOT staticTextItems!! I Never used that word in this thread, only copying your javadocs). So I explained that I use Labels for showing the titles. I *do not need* the hovers on the labels. I need the hovers on the FormItems.

        Which "normal hover APIs"? As we already discussed in this thread:

        FormItemHover and ValueHover doesn't work here, as you confirmed here:
        Originally posted by Isomorphic View Post
        So you're using a DynamicForm to display a read-only set of values, with no titles?

        The built-in hover behaviors may not work well for this, but the question here is why would you use a DynamicForm for this at all?
        Although I am not displaying a read-only set of values, with no titles, I am displaying a writable set of values, with no titles. But your statement holds here.

        TitleHover doesn't work here, since I am not showing the titles.

        The only thing that worked until now was "setPrompt()", as I said, but that is not customizable.

        Comment


          #19
          OK, so you have for example an editable DateItem, and what you actually want is to display a hover when the user is over the text input area?

          We're re-confirming here because, in our opinion, most end users would find that really annoying. You'd be popping up a hover right in the user's way as they are trying to read the value and/or place the insertion cursor.

          Instead, we think most users would expect and prefer that an explanatory hover appears on the title area, which is straightforward to achieve if you're using Labels for titles.

          Comment


            #20
            Originally posted by Isomorphic View Post
            OK, so you have for example an editable DateItem, and what you actually want is to display a hover when the user is over the text input area?

            We're re-confirming here because, in our opinion, most end users would find that really annoying. You'd be popping up a hover right in the user's way as they are trying to read the value and/or place the insertion cursor.

            Instead, we think most users would expect and prefer that an explanatory hover appears on the title area, which is straightforward to achieve if you're using Labels for titles.
            Yes, this is what I am trying to do.
            Exactly this is done by .setPrompt("text"), and this popup is not obstrusive, so I do not think users will find this annoying, because it is not obstrusive. If it was, why do you have .setPrompt("text") on formItems on the first place?
            And why is this window not customizable actually? This would be perfect.

            Comment


              #21
              We have setPrompt() on FormItem because it is not annoying for some FormItems in some modes (such as read-only items).

              But it appears we'll just have to agree to disagree on whether it's annoying. Stay tuned for more information on how best to annoy your users ;)

              Comment


                #22
                I will try to change the hovers to the labels (titles), maybe you are right ;) In my application this is not very straightforward, since there is no connection between the labels and the formItems.

                Comment


                  #23
                  We've made a tweak to the framework to fix the issue where when you supply custom hover HTML for a DateItem it fails to show up when hovering directly over the select-items.
                  This will be present in the next nightly build (Feb 6)

                  Regards
                  Isomorphic Software

                  Comment

                  Working...
                  X