Skip to main content

Calendar text cuts off / overlaps etc

4 replies [Last post]
68060
Offline
Joined: 2011-08-29
Points: 0

On the emulator atleast the Calendar is unusable, all the text is overlapping and cut off, anyone know how to pop up a Calendar fulscreen so it has enough space and also some way to dismiss it??

Fullscreen it works much nicer - problem im having is i want to do something so bloody simple yert i cant figure it out, want user to click on a textfield, go to calendar, selected date then go back to previous form and the date will fill in the text field..

ive got it to go to the calendar, but how do i pass the date back to populate the textfield etc without losing all the stuff on the previous form? getparent wont cast to a form either causes an exception - i dont know i find lwuit is really just not quite ready to be used commercially :-(

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07
Points: 0

back works fine for me, it doesn't work in a dialog though since a dialog is dismissed manually and always returns to its parent form.

Calendar is designed for the size of the form so the dialog needs to grow to allow the calendar to fill out the space I suggest you use showPacked() with a calendar to make sure it has enough space.

The previous form is not the parent, the parent is the container for the component. The way to access the text field of the previous form is to keep a pointer to it before showing your dialog, make sure to set it to null afterwards to avoid a memory leak.

68060
Offline
Joined: 2011-08-29
Points: 0

"back()" appears to jump 2 forms back too not one,

68060
Offline
Joined: 2011-08-29
Points: 0

thanks for that! altho back still goes back 2 forms! any reason why?

I think if you catch "Back" in actionPerformed and do an explicit "back" then it does its own and then yours... seems ok if my "Back" is "back"..

vprise
Offline
Joined: 2003-11-07
Points: 0

If back() is invoked twice that would probably "do it". The logic of back() navigation is pretty complex, I would suggest you just override the back() method and place a breakpoint within it to see who is invoking it.