Announcement

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

    #16
    Thank you.

    Comment


      #17
      Hi Isomorphic,

      1. It would appear that when you have +N more..., the menu actually displays N+1 items, the top one being the last one displayed in the day body. Is this by design? In our case, it could lead to some confusion for the user.
      >>#1 is resolved.

      2. If the +N more... is at the bottom of the Calendar, clicking it causes the scrollbar to appear and the menu is still slightly clipped.
      >> #2 is not resolved for us.

      SmartClient Version: v10.1p_2016-04-28/Pro Deployment (built 2016-04-28)

      Thanks

      Comment


        #18
        What is interesting is that if you keep clicking the +N more..., if it reaches the bottom, it will continue to push the canvas up, creating a larger white-space along the bottom.

        Comment


          #19
          Hmm - we'd made a change reparent the menu to prevent this natural overflow - we'll double check and update when we have more detail.

          Comment


            #20
            Hi Isomorphic,

            Is there any way, using the new menu autoChild, to configure the menu to use scrollbars once it reaches a maximum height. If there are considerable items, the menu fills the entire calendar, and it become clipped at both ends, not allowing access to some of the items.
            I played around with the overflow, but couldn't come up with a viable configuration.

            Thanks

            Comment


              #21
              You can utilize ListGrid APIs - autoFitMaxRecords will probably do it for you

              Comment


                #22
                Hi Isomorphic,

                It would appear that those properties are not honoured. Is there anything more I should be doing below?

                Thanks

                Code:
                        Menu menuProperties = new Menu();
                        menuProperties.setCellFormatter(new CellFormatter() {
                
                            @Override
                            public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
                ....
                            }
                        });
                        menuProperties.setAutoFitData(Autofit.VERTICAL);
                        menuProperties.setAutoFitMaxRecords(10);
                        setAutoChildProperties(MORE_EVENTS_AUTO_CHILD_PROPERTY, menuProperties);

                Comment


                  #23
                  Ah, right - see the doc for Menu.maxHeight and enforceMaxHeight - those should do what you want.

                  On your other remaining issue, where you see the popup causing scrollbars - we're not seeing that. However, some other changes have been made recently - given that there have been no nightly builds for a few days, it's probably worth retesting with the next build that arrives. If you still see the issue, please show you latest test code and confirm OS / browser versions.

                  Comment


                    #24
                    Hi Isomorphic,

                    The enforceMaxHeight does not appear to be available in the following build.

                    SmartClient Version: v10.1p_2016-04-28/Pro Deployment (built 2016-04-28)

                    Thanks

                    Comment


                      #25
                      It may not be exposed to SGWT - but it defaults to true - just applying a maxHeight should work.

                      Comment


                        #26
                        Unfortunately, that did not work. I actually tried that as one of my earlier attempts. That menu is feisty, doesn't want to follow instructions.
                        Last edited by stonebranch2; 3 May 2016, 11:01.

                        Comment


                          #27
                          Do you know when we might see a new nightly for 5.1?
                          Thanks

                          Comment


                            #28
                            It would be great if you can just show some *runnable* code that doesn't do what you expect it to do, rather than various prose attempts to emphasize the problem.

                            Than we can more easily look into it.

                            Nightly builds will resume shortly - we have internal works in progress.

                            Comment


                              #29
                              It would be great if you can just show some *runnable* code that doesn't do what you expect it to do, rather than various prose attempts to emphasize the problem.
                              For what issue exactly?....for two of them, you noted that you were already aware of, so I didn't provide any *runnable* code. Of course, I am still experiencing some issues with one of them (scrollbar, etc), so I can certainly try follow up on that one with a runnable test case as soon as I have time to extract one out. I will wait and test again on the next nightly though in case any of the recent changes have resolved that outstanding issue.

                              As for the more items menu height, I assumed it was clear, since you provided the recommendation, that I am simply setting the recommended property (or properties) on the autoChild, that you exposed for me on this thread.
                              I was only following up that your recommendation(s) do not appear to be honoured. As soon as I can, I can certainly try to extract out and replicate that issue as a sample test case too.

                              Regards
                              Last edited by stonebranch2; 3 May 2016, 11:06.

                              Comment


                                #30
                                Hi Isomorphic,

                                Here is the code for the menu height recommendation. As you can see from the screen capture below, the menu fills the entire canvas, and there is no way to access the events that are out of view.

                                Regards

                                Code:
                                package com.sandbox.client;
                                
                                import java.util.Date;
                                
                                import com.google.gwt.core.client.EntryPoint;
                                import com.smartgwt.client.widgets.calendar.Calendar;
                                import com.smartgwt.client.widgets.menu.Menu;
                                
                                @SuppressWarnings("deprecation")
                                public class Sandbox8 implements EntryPoint {
                                
                                    private static final String MORE_EVENTS_AUTO_CHILD_PROPERTY = "monthMoreEventsMenu";
                                    private static Date TODAY = new Date();
                                    private static int YEAR = TODAY.getYear();
                                    private static int MONTH = TODAY.getMonth();
                                    private static int START = TODAY.getDate() - TODAY.getDay();
                                
                                    @Override
                                    public void onModuleLoad() {
                                        Calendar calendar = initCalendar();
                                        calendar.setWidth100();
                                        calendar.setHeight100();
                                        calendar.show();
                                
                                        addCalendarEvents(calendar);
                                    };
                                
                                    private Calendar initCalendar() {
                                        Calendar calendar = new Calendar();
                                        calendar.setShowDayView(Boolean.FALSE);
                                        calendar.setShowWeekView(Boolean.FALSE);
                                        calendar.setShowAddEventButton(Boolean.FALSE);
                                        calendar.setCanCreateEvents(Boolean.FALSE);
                                        calendar.setShowDatePickerButton(Boolean.FALSE);
                                        calendar.setShowDateChooser(Boolean.FALSE);
                                        calendar.setDisableWeekends(Boolean.FALSE);
                                        Menu menuProperties = new Menu();
                                        menuProperties.setMaxHeight(50);
                                        calendar.setAutoChildProperties(MORE_EVENTS_AUTO_CHILD_PROPERTY, menuProperties);
                                        return calendar;
                                    }
                                
                                    private void addCalendarEvents(Calendar calendar) {
                                        for (int i = 0; i < 24; i++) {
                                            calendar.addEvent(new Date(YEAR, MONTH, START + 2, i, 15, 0), new Date(YEAR, MONTH, START + 2, i, 15, 0), "Meeting" + i + ":15", null);
                                            calendar.addEvent(new Date(YEAR, MONTH, START + 2, i, 30, 0), new Date(YEAR, MONTH, START + 2, i, 30, 0), "Meeting" + i + ":30", null);
                                            calendar.addEvent(new Date(YEAR, MONTH, START + 2, i, 45, 0), new Date(YEAR, MONTH, START + 2, i, 45, 0), "Meeting" + i + ":45", null);
                                            calendar.addEvent(new Date(YEAR, MONTH, START + 2, i, 60, 0), new Date(YEAR, MONTH, START + 2, i, 60, 0), "Meeting" + i + ":60", null);
                                        }
                                        calendar.markForRedraw();
                                    }
                                }
                                Click image for larger version

Name:	calendar.jpg
Views:	72
Size:	60.5 KB
ID:	237642
                                Attached Files

                                Comment

                                Working...
                                X