Transfer the contents of an element of a listView to a label

Good morning everyone.

Set listview selection to label

Get listview selection, split at spaces, select item with index 1, set to label

This example shows how to do it using a Label. A TextBox would work too. :wink:

Thanks to both of you.

Sorry [SteveJG, I didn't notice that I should have entered the two data, time and name.
Now I'll try it again, but I have no doubt that it will work.

Sorry again, but I spend so many hours on the PC that my brain is on fire and not only do I write nonsense, but I don't see simple functions or even don't understand them.

Here in Italy it is 04.40 I hope, after having slept for a few hours, I will be able to be clearer in my descriptions.

It doesn't work SteveJG, I'm definitely doing something wrong.


Time.aia (3.7 KB)

I repeat: I would like an event of my choice to start at the end of each hour in hourly succession.

Rereading everything I posted I realized I had confused you to the max and I deleted some of the posts.
So feel free not to help me.
Excuse me again.

This all happens because after having closed some previous posts as resolved and realizing later that there were actually some oversight errors on my part, I found myself posting the resolution of the same problem in another way, causing even more confusion. .

Question: why is it no longer possible to ask questions on posts that have already been closed but which, as I wrote, subsequently presented other problems to be resolved not through the fault of whoever provided the solution but due to an oversight on my part?

How should we behave in these cases?

As I wrote, I tried to pose the problem in another way, but this created even more confusion, whereas if I had been able to resume the closed post it would have been easier for you to find the solution.

Well, because it is closed
Just start a new thread and add a link to that closed thread and a moderator can merge the 2 threads and reopen the first one

So let's say, you pick 05:47:00C from the listview, then you like to start a procedure at 6am, 7am, 8am, etc?

Taifun

Reopening the original app, I realized that the problem of the time sequence, fortunately, had already been solved by the creator of the "Appointments" app, which I didn't remember.

Even though I still thank him, he really helped me a lot, with the vibration of his cell phone at the end of the scheduled time.

So so far everything is resolved, I made all the changes I needed, but I got stuck.

The problem that has arisen now is that to make the cell phone vibrate when the time expires, I have to manually select, each time, the element that contains the next time, because this operation copies the time onto the text of the button that will start when the time expires the vibration.

But an app of this kind should be able to do it automatically at each subsequent time and if there is no more programming, stop and then repeat the operation on each subsequent day.

I think that starting with Screen Resize which when opening the app selects the first item in the list (if the list has at least one item), with the time expiring, is already a solution.

Then with a timer at the end of each time, I would automatically select the element with the next time, in fact I tried to do it with a button, but the selection does not copy the time to the "Time" button, as instead happens manually.
I also wouldn't know how to advance from item to item with a timer.
What do you think could be a valid solution?

Sorry for the confusion Angelo. It appears you had a difficult night.

The second part of your original post (since deleted) asked about how to separate your name List to show only last names. I posted an example that shows one way to do part of that task. Here is an aia of a more complete example hopeful you find it useful to separate your ListView. I hope you remember . If you still need the advice:

lastNames.aia (2.5 KB)

I hope you will have a great holiday and wish you luck with your Project. :slightly_smiling_face:

Merry Christmas, Wesołych Świąt, Feliz Navidad, God Jul, Joyeux Noel, Καλά Χριστούγεννα, Happy Christmas, Veseloho Rizdva, Prettige Kerstdagen, Frohe Weihnachten!, 성탄 축하 , Buon Natale, 聖誕快樂 , 圣诞快乐, Sretan Božić, C рождеством!, عيد ميلاد مجيد ,

Steve

Thank you Steve, for your time and work.

Thanks of course to everyone else too.

Luckily, thanks to your suggestions and even a bit of luck, I managed to resolve many situations that seemed difficult to me.

I tried to select items one by one in succession with a button but I can't.

I thought I could do it with these blocks but nothing to do.

Can you help me please.
Controllotime (1).aia (2.0 KB)

In the final project, this selection of each element in succession must be carried out by a timer.

1 Like

Thank you, "Abraham Getzler", for making all the code for the app available.
You can find detailed information about his app at the following link:

Thank you "Anke" for your precious help.

Thanks "Juan_Antonio" for the Background extension"

Thanks to those who suggested other solutions that encouraged me to look for a solution on my own.

I will list the changes made, which I hope can serve as inspiration for others who like me find it difficult to program, hoping to be clear.

  1. modify the "Abraham Getzler" App, so that it becomes an appointment diary with the possibility of being notified 15 minutes before the end of the appointment with the start of a vibration and a sound, as well as vocally. In this example you are notified 2 minutes before the deadline, to be able to carry out all the tests.

"Anke" solved the problem of the hours running out, but I didn't realize that the times showed 10.00 AM in the afternoon and vice versa, so no signal was sent and I didn't know how to tell her, since I had already closed the post, that's why, all my confusion.
Memory_copy (1).aia (646.6 KB)

In fact, in a previous post of his I had read that the discussion on the same topic could no longer be reopened and therefore I was driving you crazy with various explanations that were close to the topic.
To make the event happen, the app requires the time to be selected manually and it works exceptionally well, but for what I intended to do, I needed everything to work automatically and even with the cell phone suspended.

Anyway, here I am.
In order to carry out the operations I needed, not knowing how to intervene in the "Abraham Getzler" blocks, because I don't understand them, I had to, once the appointments had been entered, intercept them at each deadline, without having to manually select the element of the first time and so for the subsequent ones, but not only, once the element had been selected I had to select the subsequent appointments one by one, always automatically.

I solved it like this:

  1. I changed the hours from 12 to 24
  2. from 15 to 2 minutes the deadline. temporarily
  3. I inserted a "Clocktime" which marks the time every second and inserts it into "labelTime", which I will make invisible and which you see in the center of the two Date and time buttons.
  4. A label(Label_Lengt_List), which when the app is opened, will indicate how many elements the list contains
  5. A "Label_Index" label, which will mark the progress of the selections one at a time, comparing them with the number of elements, which once reached will no longer advance the automatic selection, this operation is carried out by a timer (Clock_Controlla_Time). Which at each advancement will insert the number of advancements into the "Label_Index" label.

To do this, however, I must first intercept whether the list is empty or full, otherwise the block will occur, and I do this with a timer started by screen resize, “Clock_Control_List_Empty_Full”, and a second timer “Clock_List_Empty_Full” plus a label “Label_List_Empty_Full” which contains the control text “False”.

So before we start everything,
-check that the listview is empty or full if it is empty nothing happens if it is full it will start another timer "Clock_Sel", which in turn selects the element and reports the time of the element on the "TimePicker1l" button.

Immediately afterwards it starts the “Clock_Controlla_Time” timer which, before starting, carries out the comparison between the number of advances and the length of the list, adding “1” in “label_Index” to each selection, restarting the “Clock_Sel” timer at each selection, which will insert each time, of each selected element, on the “Time” button. Also counting at the first start how many elements the list contains.

“Clock_Controlla_Time” as you can see also carries out the comparison between the time of each element reported on the time button at each selection, with that contained in the label. Time, if this time is greater than that reported on the “TimePicker1”, the selection is blocks while waiting for the appointment time to expire by starting the alarms.

At the end I hope I was clear otherwise sorry.

Of course, the app still needs to be checked and modified a lot, but I hope that many of those who read will do so as well and if they add something new they will publish it.





You will notice that in the "Label.Index" instead of "0" I had to insert a 2, because I don't know the reason if I insert "0", it doesn't get to the actual number of elements by stopping before. Bo! If you can help me understand why. Otherwise I'll find the solution and I'll post it to you.
list length

I would add that anyone who wants to correct all the errors that exist and send me the new corrected one, I wouldn't be happy.
The TimePicke button, for example, no longer reports the current time and does not crash if you enter a certain time and I have not yet understood why.
Best wishes to everyone at MIT and the entire forum.