Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: How to Display text and image with Mobile App?



Permlink Replies: 11 - Last Post: Nov 8, 2017 8:06 AM Last Post By: Tran Tien
Tran Tien

Posts: 4
Registered: 11/26/17
How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2017 11:14 AM
Hi Everyone,
I am a newbie with firemonkey, I want to make an App about recipe of food. But I don't know how to display text and picture on our App. Which control should I use to display it.
Ex: [Recipe|http://lambanh365.com/cach-lam/cach-lam-banh-deo-la-dua-nhan-dau-xanh-thom-mat/]

Have someone ever do this app before, can help me some advise on it.

Many Thanks
Tom
Dave Nottage

Posts: 1,850
Registered: 1/7/00
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2017 11:48 AM   in response to: Tran Tien in response to: Tran Tien
Tran Tien wrote:

But I don't know how to display text and picture on our App. Which control should I use to display it

With Firemonkey you can put a TLabel inside a TImage. In your example, place a TLabel inside a TImage and set the Align
property of the TLabel to Center.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Tran Tien

Posts: 4
Registered: 11/26/17
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 29, 2017 6:50 PM   in response to: Dave Nottage in response to: Dave Nottage
Hi Dave,
Problem is each recipe has many text and Image, and some recipe has 4 images, some just have 2.
How can we load it from database automatically?

Dave Nottage wrote:
Tran Tien wrote:

But I don't know how to display text and picture on our App. Which control should I use to display it

With Firemonkey you can put a TLabel inside a TImage. In your example, place a TLabel inside a TImage and set the Align
property of the TLabel to Center.

--
Dave Nottage [MVP, TeamB]
Find hints, tips and tricks at Delphi Worlds blog: http://www.delphiworlds.com
Eli M

Posts: 1,346
Registered: 11/9/13
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 30, 2017 5:19 AM   in response to: Tran Tien in response to: Tran Tien
Use a TFrame. Build your individual item as a TFrame. Load a bunch of the TFrame into a TVertScrollBox to show multiple items.
Tran Tien

Posts: 4
Registered: 11/26/17
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 2, 2017 9:17 AM   in response to: Eli M in response to: Eli M
Hi Eli M,

Can you help me how can I store data on database? Because there is a lot of text (paragraph) and image in on recipe. according to your instruction. mean that I I have to store each paragraph and image in 1 row and then load it to Tframe.

Eli M wrote:
Use a TFrame. Build your individual item as a TFrame. Load a bunch of the TFrame into a TVertScrollBox to show multiple items.
Eli M

Posts: 1,346
Registered: 11/9/13
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2017 1:56 PM   in response to: Tran Tien in response to: Tran Tien
Put a TFDMemTable in a DataModule. Include the DataModule unit in each TFrame. LiveBind the image and text to a TBindSource that connects to the TFDMemTable in the DataModule. You can do different combinations of this too. Each TFrame could have it's own TFDMemTable instead.
Alex Sv

Posts: 92
Registered: 1/11/04
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2017 3:32 PM   in response to: Tran Tien in response to: Tran Tien
Using HTML Component Library you can store recipes in HTML and display them in HtPanel.

http://delphihtmlcomponents.com/

Tran Tien wrote:
Hi Everyone,
I am a newbie with firemonkey, I want to make an App about recipe of food. But I don't know how to display text and picture on our App. Which control should I use to display it.
Ex: [Recipe|http://lambanh365.com/cach-lam/cach-lam-banh-deo-la-dua-nhan-dau-xanh-thom-mat/]

Have someone ever do this app before, can help me some advise on it.

Many Thanks
Tom
Jack Lee

Posts: 26
Registered: 5/12/01
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 5, 2017 9:10 PM   in response to: Tran Tien in response to: Tran Tien
You should draw a picture of your screen then men can say how to implement it using firemonkey.

Or you can use HTML to show it, with use a TWebBrowser component in your APP.

But the data, is another question. You must have data before you show it on screen. Maybe you have to have a DataBase server in a server, and access it by FireDAC directly or by DataSnap or other way in your APP.



Tran Tien wrote:
Hi Everyone,
I am a newbie with firemonkey, I want to make an App about recipe of food. But I don't know how to display text and picture on our App. Which control should I use to display it.
Ex: [Recipe|http://lambanh365.com/cach-lam/cach-lam-banh-deo-la-dua-nhan-dau-xanh-thom-mat/]

Have someone ever do this app before, can help me some advise on it.

Many Thanks
Tom
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2017 12:42 PM   in response to: Jack Lee in response to: Jack Lee
Am 06.11.2017 um 06:10 schrieb Jack Lee:
You should

Yes, your should...

Soory for posting sometzhing not adding to the discussion as such, but
this is the 2nd post (of somebody) in the same thread which uses top
posting.

Please do us all the favour to put your answers below the text answering
to in the future, as this is being considered norm here and helps people
not following a topic from the beginning on etc.

The same of course applies to Alex as well.

Greetings and thanks for careing

Markus
Tran Tien

Posts: 4
Registered: 11/26/17
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 8, 2017 8:06 AM   in response to: Jack Lee in response to: Jack Lee
My purpose is the same app to display news article, each article will have many text and image.
And How can I display it on FMX with htm format?

Jack Lee wrote:
You should draw a picture of your screen then men can say how to implement it using firemonkey.

Or you can use HTML to show it, with use a TWebBrowser component in your APP.

But the data, is another question. You must have data before you show it on screen. Maybe you have to have a DataBase server in a server, and access it by FireDAC directly or by DataSnap or other way in your APP.


Tran Tien wrote:
Hi Everyone,
I am a newbie with firemonkey, I want to make an App about recipe of food. But I don't know how to display text and picture on our App. Which control should I use to display it.
Ex: [Recipe|http://lambanh365.com/cach-lam/cach-lam-banh-deo-la-dua-nhan-dau-xanh-thom-mat/]

Have someone ever do this app before, can help me some advise on it.

Many Thanks
Tom
John Mitchell

Posts: 64
Registered: 9/23/02
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 6, 2017 1:51 PM   in response to: Tran Tien in response to: Tran Tien
Sorry to continue the off topic, but I for one prefer the responses at the top instead of having to scroll through the stuff i already read to see the next comments.
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: How to Display text and image with Mobile App?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 7, 2017 1:20 PM   in response to: John Mitchell in response to: John Mitchell
Am 06.11.2017 um 22:51 schrieb John Mitchell:
Sorry to continue the off topic, but I for one prefer the responses at the top instead of having to scroll through the stuff i already read to see the next comments.

That'snotz the norm here due to the following reason (some TeamB members
might add additional answers to mine):

In contrast to e-mail which is directly directed to people communicating
with each others where each person usually knows the history of the
subject already these discussions are joined by others which do need to
know the history first. One can trim down that to the most recent
history and only give so much context needed for understanding the last
answer, but for somebody just joining a longer discussion it makes way
more sense to have the question etc. first and then the answer.

Greetings

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

Server Response from: ETNAJIVE02