Announcement

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

  • wallytax
    replied
    That's great news! Thanks for the fast response (and fix). I will check tomorrow's build (because of different time zones, it's not fully clear what "tomorrow" is, but I just checked the latest build and I didn't see any differences).

    Leave a comment:


  • Isomorphic
    replied
    There was a bug in Canvas.init() with this line of code: delete this.isGroup, which was solved.
    The fix will be available as of tomorrow's build.

    Isomorphic Software

    Leave a comment:


  • wallytax
    replied
    If the first line in Canvas.setIsGroup would be commented out (but I'm sure it's there for optimization reasons), it will work.

    Code:
    setIsGroup : function (isGroup) {
        if (isGroup == this.isGroup) return;
        // ...
    }
    Another way of fixing it is by creating this derived class (which is slightly cleaner than the previous example):

    Code:
        isc.defineClass('GroupedForm', isc.DynamicForm).addProperties({
            padding: 5,
    
            init: function () {
                this.Super('init', arguments);
                this.setIsGroup(true);
            }
        });
    I think the cause of the problem is that setIsGroup() in Canvas is called to soon (it's called in init());

    Leave a comment:


  • wallytax
    replied
    Via another post, I found out that this will work, but I think that's not nice. One should be able to derive from a (Canvas) class and set isGroup to true without the need to manually set the border and group title.

    Code:
        isc.defineClass('GroupedForm', isc.DynamicForm).addProperties({
            isGroup: true,
            padding: 5,
    
            initWidget: function () {
                this.setBorder(this.groupBorderCSS);
                this.setGroupTitle(this.groupTitle);
                this.Super('initWidget', arguments);
            }
        });

    Leave a comment:


  • wallytax
    replied
    I am indeed using the ValuesManager and define several forms and this works, but it is quite some extra lines to add, because for all these forms I need to set { isGroup: true, padding: 5 }. I've tried creating an GroupedForm class deriving from DynamicForm and only adding these two properties, but somehow this doesn't work. At least I am not seeing a border around the form.

    Code:
        isc.defineClass('GroupedForm', isc.DynamicForm).addProperties({
            isGroup: true,
            padding: 5
        });
    Last edited by wallytax; 25 Mar 2015, 01:24. Reason: Added example

    Leave a comment:


  • slartidan
    replied
    use ValuesManager

    I found an old thread with kind of the same problem: http://forums.smartclient.com/archive/index.php/t-14738.html

    Seems like "ValuesManager" is what you are looking for.

    Leave a comment:


  • wallytax
    replied
    I use the isGroup and groupTitle options, but that means I need to split the form in multiple pieces. Not a disaster, but I wonder if there's an simpler approach.

    Leave a comment:


  • dencel
    replied
    Check out http://www.smartclient.com/docs/10.0/a/b/c/go.html#attr..Canvas.isGroup

    This will print a group line around the layout and print the grouptitle of the canvas.

    Leave a comment:


  • wallytax
    started a topic Are legends possible in a DynamicForm?

    Are legends possible in a DynamicForm?

    I want to group some fields in a DynamicForm. I have found a way of doing this by creating a ValueManager and defining several small forms that all point to the same ValueManager instance. This works, but I wonder if this is the best way. I know I can also use sections, but this is not giving me the desired look and feel.
Working...
X