Calendar switching in Matlab GUI (DateChooserPanel) - matlab

I have a question about Matlab GUI's. I'm gonna try and explain as best as I can what exactly I need help for.
I am using GUIDE for building GUI, and have a listbox with ~10 names in it. When I click on each of the names (individuals) a calendar will appear where I can select multiple dates on.
Each person has it's own calendar which appears when you click on their name for the first time. Every calendar is created in the same place(coordinates) on GUI. Calendars become visible (are created) after the listbox selection, at first only listbox is visible on the GUI.
The thing I want to do is to be able to switch between each of these calendars depending on what person's name I click on the listbox. For example, click on 'martin' shows his calendar, click on 'joe' brings his calendar up front etc. So basically, I have ~10 calendars I want to switch between (while the selected dates don't reset with each switch).
I am using Jide's DateChooserPanel which is implemented in Matlab, as it is really easy to use and is just perfect for my needs.
The following code generates a calendar and sets an ability to select multiple dates and works perfect:
com.mathworks.mwswing.MJUtilities.initJIDE;
jPanel = com.jidesoft.combobox.DateChooserPanel;
[hPanel,hContainer] = javacomponent(jPanel,[219,66,200,200],gcf);
jModel = hPanel.getSelectionModel;
jModel.setSelectionMode(jModel.MULTIPLE_INTERVAL_SELECTION);
And I can get the chosen dates with this line:
hPanel.getSelectionModel.getSelectedDates
And now I'm stuck because I don't know how to switch between those calendars. I was trying to get their handles and somehow get that person's calendar in front of the others, but I couldn't find a way.
Any advice/help is appreciated!

Related

How do I display data/information with Matlab App Designer?

I would like to display some information to the user via Matlab App Designer's GUI. I am new to this program and can't seem to find a widget that provides what I feel should be a simple function. Am I missing something? Examples would include showing the user:
The path of the file that he/she selected
Errors such as "No files detected" that are printed in a Matlab script called on by the GUI code.
Other print statements in code such as "Done!", etc that will inform the user when a process is complete.
Is there a way to capture the output in the Matlab command line and report these in a window of some sort in the GUI? Thanks in advance!
You can use a TextArea to display information for the user. Here's how I made a simple example:
Drag a button to the app in design view.
Drag in a text area also. I changed the label to Feedback.
Select the button and use the Callbacks tab in the bottom right of app designer to add a callback with the default name it gives you.
Edit the callback to contain
answer = 'what your want to display';
app.FeedbackTextArea.Value = answer;
When you push the button the text area gets filled. In your code, instead of just setting 'answer' to some string, set a variable using whatever code is dealing with your user's information. The key is to store what you want the user to see in a variable and then assign that to the "Value" parameter of the text area or other widget where you want them to see the results.

Powershell - ComboBox Calender

i wrote a script for get-messagetrackinglog.
I added a gui for recipients, sender, starttime etc.
And now i want to add a calendar to chose the date for start and end instead of tying it manually.
Im trying to do this with a combobox. So, the calendar pops up when i click on the arrow from the combobox.
So far, i have a calendar but i dont know how to implement that into my combobox.
I already tried to $comboBox.Items.Add("$objCalendar").
But this is not working at all. The Output for this is "System.Windows.Forms.MonthCalendar, SelectionRange: Start: 23.05.2017 00:00:00, End: 23.05.2017 00:00:00"
I think i need a parameter for $objCalender._ , but i couldnt find anything.
Any tips, please.
I used DateTimePicker instead of ComboBox+MonthCalendar and its working now!

Chronoforms 5 Date Picker in Multiplier Not Working

I'm using Chronoform's 5 Multiplier feature which is triggerd with an 'Add Another Student' button. Prior to the Multiplier, I have two datepickers. Within the Multiplier are two datepickers. The first set of datepickers (prior to the Multiplier) pops up the calendar, as it should. Within the Multiplier, the calendar does not pop up.
Both datepickers have indpendent fieldIDs. After asking Chronoforms regarding this issue, the answer I received was:
"You'd have to add custom code to run when the Add button is clicked and attach the datepicker to the new...input then."
I'm not sure what this means.
Has anyone successfully been able to use Chronoforms 5 to get the datepicker to work within a Multiplier? Users can enter in a date manually, but that's not user-friendly. I would prefer to try to get this working.

Custom DatePicker with just two components

I want to to use custom datePicker in my project. In Mode date it shows Month,Day and Year, in my case I don't need Year, I just want to display Month and day.
The API does not provide a way to do this. If you want to be able to, please file a report requesting this ability, and it'll hopefully get included in a future release of iOS.
In the meantime, you can make a pretty convincing replica yourself using a UIPickerView.
Im sorry but following the reference of the PickerView
http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIDatePicker_Class/Reference/UIDatePicker.html#//apple_ref/doc/c_ref/UIDatePickerMode
It says that is not possible to do that, so your only option is to implemente yourself the delegate and the datasource, and create the pickerview with the data you need.

Record the timestamps of slide changes during a live Powerpoint presentation?

I am planning to implement a lecture capture solution. One of the requirements is to record both the presenter and the slideshow. The presenter is recorded with a videocamera obviously, and the slideshow will probably be captured using a tool like Camtasia.
Now during playback three components are visible: the presenter, the slides and a table of contents. Clicking a chapter title in the TOC causes the video to navigate to the corresponding section. This means that a mapping must be made between chapter titles and their timestamps in the video.
Usually a change of topic is accompanied with a slide change in the Powerpoint presentation. So the timestamps could be deduced from the slidechanges. However, this requires me to detect slide changes during the live presentation. And I don't know how to do that.
Anyone here knows how to do detect slide changes? Is there a Powerpoint API where I can connect event handlers or something like that? I'd greatly appreciate your help!
Edit
This issue is no longer relevant for my current work so this question will not be updated by me. However, you are still free to help others by posting your answers/insights here.
Here's some code that will get you most of the way there.
First, in PowerPoint VBE, create a class, call it clsPPTEvents. Put the following inside:
Public WithEvents PPTEvent As Application
Private Sub PPTEvent_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
MsgBox "Position: " & Wn.View.CurrentShowPosition & ", Time: " & Time
End Sub
Then create a module, call it anything, and put the following inside:
Public newPPTEvents As New clsPPTEvents
Sub StartEvents()
Set newPPTEvents.PPTEvent = Application
End Sub
Sub EndEvents()
Set newPPTEvents.PPTEvent = Nothing
End Sub
By then running the StartEvents sub, you can go into presentation mode and on every slide change, the slide number (position) and current time of the change will be displayed in a message box. You can use these (or other) variables to write to a file. Upon exiting the running slide show, you can then run EndEvents to stop the API hook.
It would be elegant to detect the slide changes, but wouldn't it be more practical to have the presenter to type a hotkey whenever there is a topic change? Or anything similar, but cooperating with the presenter, since he knows best when the topic changes.
Sorry not to provide an elegant answer.