Jump to content
Sign in to follow this  
Ranja AZ

Amount input for Android POS

Recommended Posts

I need a component like TEdit to enter amounts like $ 23,000.00. I see that TMaskEdit does not exist for FMX. What componant can I use?

 Regard.

Share this post


Link to post
Guest

maybe a simple casting?

 

TDBEDIT( EDITXXX ).DisplayFormat := 'xxxxx';

 

hug

Share this post


Link to post
50 minutes ago, emailx45 said:

maybe a simple casting?

I like when interposer make default controls really usable, instead of new control, needed to be maintained, etc.

But that is a philosophical question maybe.

Edited by Rollo62

Share this post


Link to post
Guest

not needs re-build the whells when we have two feet.

 

right?

 

a casting can solve it in many cases.

 

hug

Share this post


Link to post
9 minutes ago, emailx45 said:

a casting can solve it in many cases

Yes, but maybe this has something to do with peoples expectation.

Probably you are right, and the cast can solve this case.

 

However, I maybe have a too high expectation about what a "normal" TEdit should be able to do, so I like to enhance this functionality to an acceptable level.

For example, take the simple TDateEdit, which should nicely jump from yy to mm to dd.

 

With that expectation of TEdit I would not need a bunch of "TNumberBox, TCurrencyEdit, TDateEdit, TTimeEdit, TIpEdit, TIBAN_Edit, etc.", 
it will be all in one TEdit.

The formatting of display text is very basic task for me, and it should be solved once and for all.

Anyway, I like philosophical discussions, but I understand also the reasons why others might don't like that idea.

 

But I'm crazy enough to go my own ways, if I needed to :classic_cool:

 

Share this post


Link to post
Guest
1 hour ago, Rollo62 said:

Anyway, I like philosophical discussions, but I understand also the reasons why others might don't like that idea.

hi @Rollo62 

 

Speaking of philosophy, maybe it would be better if you read about object-oriented programming, and especially when it says that we should share the burden instead of carrying it alone ... I mean, a class shouldn't do everything for herself, but only what she has to do.

 

So, that is why the classes' ancestry exists, and, consequently, their inheritance.

 

A class "SHOULD NOT EXIST ONLY BECAUSE IT IS NECESSARY IN A DATE, BUT FOR THE POSSIBILITY OF YOUR FUTURE CHANGES (HERITIES)".

 

This is one of the reasons for the existence of object-oriented programming. Break the problem down into smaller parts, until it is completely resolved.

 

Thus, there are also the engineering definitions of a project, whether in the area of computing, in the construction of a building or even in the construction of your life !!!

 

You don't start living right after leaving a university (college), you first have to learn to get up, walk, run for later, in a well deserved rest, sit down and lean over the books of life. And finally, in front of your computer, take the time to analyze the next steps.

 

That's it!

 

Each piece of the class (its sub-classes), does a task. And in the end, if everything has been coded as it should be, you will have your job done successfully. Or not....  😂😂😁:classic_cheerleader:

 

In time, did know that exist just only "ONE CLASS" in all Object Pascal?

---> did you know what is it?

 

hug

Edited by Guest

Share this post


Link to post

Good morning all,

 

Thank you for your help!

 

I agree with Roll62's idea: just improve TEdit. In the meantime, I will try the currency edit program and also the simple emailx45 casting.

 

Thanks a lot guys!

 

 

Share this post


Link to post

Yes, I understand all your points, and totally agree with you.

 

Quote

but only what she has to do. 

 

Only there I think that this class should show me some "blob" space on the screen, with presentation of the underlaying informations,

that not really matters what kind of data that is.

I don't want to choose from 20 versions of this edit, to just make it look as it should.

 

Ok, there were limits.

For example with chemical formulas or math formulas, I would consider a specific derived type probably :classic_smile:

Share this post


Link to post
7 minutes ago, Ranja AZ said:

exmailx45: I can't use TDBEDIT for android, how do I do?

 

You could consider CustomFormat with Livebindings, but I cannot really propose Livebindings.

Thats workable, but has many other issues on the road too.

If you want to use it, I would propose to use LB from runtime, see Steve Balls nice archive here.

Edited by Rollo62

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×