Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Simple mobile popup menu?


This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 6 - Last Post: Mar 16, 2018 8:50 AM Last Post By: Markus Humm
Michael Leahy

Posts: 239
Registered: 5/9/07
Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 5, 2018 2:09 PM
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

So. Is there a(nother) way to create a simple popup menu of text items?
Bob Carson

Posts: 62
Registered: 10/8/04
Re: Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 6, 2018 3:24 PM   in response to: Michael Leahy in response to: Michael Leahy
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

So. Is there a(nother) way to create a simple popup menu of text items?

Don't place any TLabels on the TPopup menu. Double click on the Popup menu component in design to add menu items. Text displayed in the Text part of the Popup menu item.
Michael Leahy

Posts: 239
Registered: 5/9/07
Re: Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 9, 2018 8:16 AM   in response to: Bob Carson in response to: Bob Carson
Bob Carson wrote:
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

So. Is there a(nother) way to create a simple popup menu of text items?

Don't place any TLabels on the TPopup menu. Double click on the Popup menu component in design to add menu items. Text displayed in the Text part of the Popup menu item.

I think you're referring to TPopupMenu. That component does not seem to work on mobile.
Jeremy North

Posts: 402
Registered: 9/20/99
Re: Simple mobile popup menu?
Helpful
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 13, 2018 7:46 PM   in response to: Michael Leahy in response to: Michael Leahy
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

So. Is there a(nother) way to create a simple popup menu of text items?

The best way would be to fake it.

Align a layout contents
Display rectangle with popup items (figure out screen coordinates)
If the layout is touched, hide the popup
If the item is touched, hide the popup

Optionally, use a rectangle with opacity set < 1 to dim the app.
Michael Leahy

Posts: 239
Registered: 5/9/07
Re: Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 14, 2018 12:25 PM   in response to: Jeremy North in response to: Jeremy North
Jeremy North wrote:
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

So. Is there a(nother) way to create a simple popup menu of text items?

The best way would be to fake it.

Align a layout contents
Display rectangle with popup items (figure out screen coordinates)
If the layout is touched, hide the popup
If the item is touched, hide the popup

Optionally, use a rectangle with opacity set < 1 to dim the app.

That's exactly what I ended up doing. I forgot about having it hide itself if the dimmed rectangle is touched. Adding that now.
Michael Leahy

Posts: 239
Registered: 5/9/07
Re: Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 15, 2018 11:34 AM   in response to: Michael Leahy in response to: Michael Leahy
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

Apparently the "haywire" text of the labels was reported here https://quality.embarcadero.com/browse/RSP-19852
and fixed in 10.2.3.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: Simple mobile popup menu?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 16, 2018 8:50 AM   in response to: Michael Leahy in response to: Michael Leahy
Michael Leahy wrote:
Michael Leahy wrote:
I need a simple list of text items that will pop up and form a menu on mobile apps. (Delphi 10.2.2)

I've tried using a TPopup and placing a few TLabels on it. When it pops up, the text of the labels goes haywire, sometimes half the font size, sometimes twice the font size, sometimes red colored text and sometimes right aligned text. I can shift the mobile device from portrait to landscape and (sometimes) the text anomalies will correct themselves.

Apparently the "haywire" text of the labels was reported here https://quality.embarcadero.com/browse/RSP-19852
and fixed in 10.2.3

Did you try if it's really fixed already?
Might render your "do it yourself" solution superlous.

Greetings

Markus.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02