Please help! When I click the button, a textbox doesn't appear

I am trying to help my students build a calendar where they can click a button, a textbox will open on a certain date. The user can then add a reminder to that date and have the reminder saved.

I have been able to get the calendar to fill in with current month and year. I have the correct first day on the calendar. I know the DayButtons are clickable because I added a call Notifier1.ShowMessageDialog and I get the message I am expecting. I just can't click the DayButton and add a reminder.
picture_blocks

I have attached the picture of the blocks. I checked to make sure the Textbox_Reminder, Button_SaveReminder and Label_Reminder do not have Visible checked in the Designer tab.

Please help me get this to work!

Is the textbox located in the viewable screen ? Do you see the button and the label ?

Just in case, give the textbox an obvious background colour (for testing), and set a hint?

Yes I can see the textbox on my phone. I can see the number for the date but when I click into the button, a textbox does not appear,

Is it inside a non-visible arrangement ?

Yes, I have a clock and a notifier. My students want to code a calendar that automatically determines the month and year. Then it assigns the days correctly within the grid. I got all of that to work.

The Textbox.Reminder is in the Reminder Section on the Designer Tab. Textbox_Reminder is not visible.

You may need to share your aia project here so we can see what you are doing...

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.

export_and_upload_aia

Practice.aia (8.0 KB)

As I suggested, your reminder section is not visible, and you do not make it visible on the button click, therefore you cannot see the textbox inside the reminder section.

Use this block in your button click events

image

Screenshot

Addtional:

You will see from this that AppInventor logic dictates that any component inside a non-visible arrangement will not be visible, regardless of its state.

With this in mind, the components inside your reminder section can all be visible, and you just need to handle the visibility of the reminder section.

We could help you make your blocks coding much more concise as well, but this becomes more advanced, and may be beyond your students at this stage ? (Oh, I see that @ABG has got in there already :wink: )

1 Like

You also are in serious need of a procedure and parameter to handle that thirty-fold duplication of code in a month's supply of buttons.

Either that, or a generic click event.

Sample code: