QWidget or just paintings? - html

I work on a Qt4 calendar custom widget and in month view (a grid of more or less 30 cells/days), in each day's cell, I want to draw events of the day like this:
start hour - title
start hour - title
start hour - title
(...)
So, just a vertical list of events, with HTML formatting.
I'd like to offer the possibility to move events betweens cells with drag'n'drop.
So, I don't know if I must create a QWidget for each cell with QLabels inside or if I can render html on those cells and manage drag'n'drop in a other way...

If you want to, you could manage drag and drop yourself by checking which item was clicked on when the drag started, and putting the appropriate data into the drag events. However, I think your first option sounds easier, at least until you come across other requirements that makes it not work.

Related

In Workshop: How can I create buttons (functions?) so that user can segment by day, week, month or year

Background
I've read about Typescript, but I am not a developer, so I am interested in how can I learn how can I create useful functions in Workshop.
Question 1
How can I create buttons (functions?) so that I can create buttons for users to select segment by day, week, month or year?
You could use Functions to do that but you can also do it directly in workshop with a combination of button + tabbed section.
Indeed:
you create a button (like a Menu button for instance) where you list all the options (Day, Week, Year).
Then you create a tabbed section with as many tabs as they are choices
For each tab you create the chart you want to show, segmented by either day / month / year etc
You hide the header of the section (not to see the tab labels anymore)
In the button, you add to every single choice an event "Switch to ... Tab X)
The downside of this is obviously that you'll need to maintain many charts and thus it is more painful if you have one thing to change on the chart (the color etc...) as you'll need to do it several times.
Hope it can help you if you want to explore non-technical ways of achieving the above.
Maxime

Need Solution for Full Calendar with list of events and link to specific event page

I'm building my final project for my studies and I'm trying to make an event calendar that shows events in the calendar itself. I found a few solutions so I'm good with that part, I think.
Although, what I want to add is an option so that under my calendar there will be a list of all events for this month (it's a monthly calendar) and the list will match what's showing on the calendar itself.
When someone presses one of the events on the list it will take them to a specific page for the event, and there will be an option to have an open discussion about the event.
Is that possible?
Is it to complex for a beginner to do?
What are my options?

Selecting/highlighting next adjacent cell in row after function has been executed in google script

I am not really experienced with coding so I apologize in advance if this is a stupid question with an obvious answer...
I use a google sheet to keep track of things at work, and my employees use it multiple times a day. They will either type one of three phrases into a certain cell on a row, so I have created buttons using the drawing feature that they can simply click, which will insert the appropriate text into the highlighted cell.
Once this text is inserted into the cell, I would like to add something to the end of the function that automatically selects the next adjacent cell in the row (to the right) so they can continue typing in. Currently, once they click the button to insert text into one cell (e.g., B23) they have to use the mouse to manually select C23 before typing into that cell. For some reason you cannot use the right arrow key or tab key on the keyboard to move over, so I am wondering if there is a way to add the selecting process into the script (or even a workaround for allowing the tab or right arrow keys to work).
I realize this may seem like a tedious question and folks may think it is awfully lazy of me to ask for a more efficient way to move over to a cell than using the mouse, but my employees use the sheet hundreds of times a day, so I'd really like to maximize the efficiency for them to make it as easy and convenient as possible. Inputting data can be tedious enough, so I am trying to simplify things and make it as least painful as possible :)
Thanks so much!
There are several ways to select the cell at the right. One way is to use offset(rowOffset,columnOffset):
range.offset(0,1)
You are correct. When using a button the focus stays in the button when it is clicked. After some trial and error, I think I found a way that will work fot you. I created a html sidebar that is opened from a custom menu. Once opened, you can leave it opened, HTML allows control over the focus using 'google.script.host.editor.focus()'. Then you can type in the cell. Attached is my sample spreadsheet you can copy and try. Let me know if you need any help changing the button names or text. Sorry my first try didn't work correctly. https://docs.google.com/spreadsheets/d/1KlNSJnZDNIb2chUK3SlKJg79VNIrsAbIbUvHyLwTLWk/edit?usp=sharing

How to create a news-reel on a form in access

I would like to set up a news-reel on a form to update users on forthcoming changes etc can someone point me in the right direction.
I would recommend using a continuous (sub)form bound to a table News(ID,Timestamp,Info) and sort Timestamp DESC so the last news will always show up topmost. You can also put a query between table and form and use the TOP keyword to extract only the latest N infos. On the other hand you can set a filter on the form to display all news with a datetime higher than DATE() - numDays. There are, as you see, numerous ways depending on your intention.
You can bind the reloading of this (sub)form to the ON_CURRENT event of the parent form so it gets updated each time someone does something in the parent form. If the parent form is never reloaded or flipped but you still want to update on a regular basis during the day you can use the Timer approach as #Horaciux has mentioned.

UiApp cache vertical panel

Developing small app to record a set of 6 readings for monitoring purposes in 31 rooms. App will have two main views, one view to show list of buttons for each room where readings will be taken, a second view where the values will be entered for a particular room and then posted to a spreadsheet.
The process in mind here is click on button for a particular room, enter the data, return to button view to choose another room to enter the data for that room and then back to button view screen.
Since the button view will seldom change do I have any options for caching this view so that I do not have to run a function to rebuild it each time. I have this function
function createTGSRoomListButtons(sh, aData){}
That takes the list of rooms and builds a panel of buttons for selecting the different rooms.
The question that I have can the above function be run once to cobble together the UI, cached and the later simply be 'recalled'?
TO that some end the view where the data will be entered can this be partially cached so that with each rendering a reference to a specific room can be made.
New to Google Apps Script so not really sure how to properly determine my answer.
You can have multiple panels in an UI and play with visibility to show one or another... no need to cache any content since they remain unchanged in the process.
If I understood your use case well, the panel with specific room info would be modified according to spreadsheet data so in this case you won't need to cache values since they would be "reconstructed" each time. The trick to show/hide panel has been shown in this post with clientHandlersand multiple panels in a unique vertical panel to ensure that the visible panel is always at the right place.
A very simple way would be build the UI for the first time and then hide/unhide the buttons' panel each time using the setVisible() method of the panel