Thank you.
Announcement
Collapse
No announcement yet.
X
-
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.
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.
SmartClient Version: v10.1p_2016-04-28/Pro Deployment (built 2016-04-28)
Thanks
Comment
-
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
-
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
-
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
-
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
-
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.
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.
RegardsLast edited by stonebranch2; 3 May 2016, 11:06.
Comment
-
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(); } }
Comment
Comment