Please show your most complex PICTURE
Moderator: Rathinagiri
Re: Please show your most complex PICTURE
Hi Rathinagiri.
Yes you are right about date (I don't remember well, but I think like HMG3); it can be done, but I don't find a Harbour function to do a simple test: IS-A-VALID-DATE (there is ISDATE but with different behaviour)? There are many functions to handle date but not this one; on the other hand, I don't want to use contrib library, I think it is not a good strategy...
On the other hand, I don't see many answer to this thread about complex PICTURE and I think there isn't any reasons to create a complex object to do something if it's not used. A very simple input (without any picture) can be better. Anyway....
Someone can help me about IS-A-VALID-DATE to do check?
Cheers
Yes you are right about date (I don't remember well, but I think like HMG3); it can be done, but I don't find a Harbour function to do a simple test: IS-A-VALID-DATE (there is ISDATE but with different behaviour)? There are many functions to handle date but not this one; on the other hand, I don't want to use contrib library, I think it is not a good strategy...
On the other hand, I don't see many answer to this thread about complex PICTURE and I think there isn't any reasons to create a complex object to do something if it's not used. A very simple input (without any picture) can be better. Anyway....
Someone can help me about IS-A-VALID-DATE to do check?
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Please show your most complex PICTURE
There was a checking code in hmg4 textbox.... at least in the past... if you entered a wrong date it was cleared since the conversion from type char to type date failed....
Code: Select all
IF empty( stod( ::value() ) )
// INVALID DATE
ENDIF
Re: Please show your most complex PICTURE
Hi MrDuck.
Many thanks for suggestion.
I have used another trick: IF MONTH( dDate) == 0 is wrong date.
But your is better: short.
Anyway, I have update the zipped file and fixed bug about numeric value see this color
Download and play.
Cheers
Many thanks for suggestion.
I have used another trick: IF MONTH( dDate) == 0 is wrong date.
But your is better: short.
Anyway, I have update the zipped file and fixed bug about numeric value see this color
Download and play.
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Please show your most complex PICTURE
Hi friends,
Today (2011.12.15), I have update my demo with a lot of improvement. Please read my post and play.
Cheers
Today (2011.12.15), I have update my demo with a lot of improvement. Please read my post and play.
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Please show your most complex PICTURE
Hi to everyone.
I am truly
No one seems interested in this development. Probably, because do you think it is not possible with HMG4
In attachment you can find a souce code (semi-oop) and related running demo compiled with my HMG4 revised.
I'm very
Cheers
I am truly
No one seems interested in this development. Probably, because do you think it is not possible with HMG4
In attachment you can find a souce code (semi-oop) and related running demo compiled with my HMG4 revised.
I'm very
Cheers
- Attachments
-
- Hmg_TextBox.zip
- hmg4 demo
- (1.35 MiB) Downloaded 232 times
Luigi from Italy
www.L3W.it
www.L3W.it
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Please show your most complex PICTURE
Hi Luigi,
That looks just great! I am just sleepy at 1.51 a.m. and I would give my comments in the morning.
That looks just great! I am just sleepy at 1.51 a.m. and I would give my comments in the morning.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Please show your most complex PICTURE
I like the right aligned editing now Luigi.
So, can we have numeric and right aligned on the same textbox?
So, can we have numeric and right aligned on the same textbox?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Please show your most complex PICTURE
Re: Please show your most complex PICTURE
Hi guys.
@Mol: about BACKSPACE or DEL with masquered field you can only "overwrite" the position with a valid character.
If I have a TEXTBOX with this picture "AAA", IMHO, you must enter a valid char in every position (eg. you must enter "FrE").
In this condition, DEL or BACKSPACE are unuseful because you must not remove the character (or the position). On the other hand, if I use DEL or BACKSPACE, what is the right character? NULL it's wrong, SPACE can be considered wrong, etc. because the picture in that position say "A". The string of codes (the mask) give us these informations: 1) what is a valid character (simple coding "A", "X", "N", "9") and the length (f.e. 3 characters must be entered and they must be in the range A-Z and a-z). If you have time, take a look to the codes related with QT inputmask. F.e. they have these codes:
"A" (like Clipper) and it means "required" and "a" (like clipper) but it means "not required". On the other hand, there is another parameter at the end of the QT inputmask and its significate is: instead space what is the "null" character to fill out the string? For example, you can create this Qt inputmask: "NnN;*" and enter "A2b" or enter "A b" but you will see "A*b". Output text must be 3 length.
About other I must investigate. Thanks for you notice.
@Rathinagiri.
At this moment, ALL datatype are left aligned in every condition (editing and viewing). I have forced right alignment for TXT_NUMERIC while viewing; I thought: can be the default for numeric value. So, I can leave left aligned every data type and must be the programmer who uses RIGHTALIGN option (like in this demo for textbox). The internal trick is to use the alignment; it does not affect the source code needed to handle the insertion of characters.
On the other hand, HMG3 has only one option: RIGHTALIGN and numeric value are always right align.
I can think other solution, but it requires a new "option" for numeric value.....
Thanks to everyone
Cheers
@Mol: about BACKSPACE or DEL with masquered field you can only "overwrite" the position with a valid character.
If I have a TEXTBOX with this picture "AAA", IMHO, you must enter a valid char in every position (eg. you must enter "FrE").
In this condition, DEL or BACKSPACE are unuseful because you must not remove the character (or the position). On the other hand, if I use DEL or BACKSPACE, what is the right character? NULL it's wrong, SPACE can be considered wrong, etc. because the picture in that position say "A". The string of codes (the mask) give us these informations: 1) what is a valid character (simple coding "A", "X", "N", "9") and the length (f.e. 3 characters must be entered and they must be in the range A-Z and a-z). If you have time, take a look to the codes related with QT inputmask. F.e. they have these codes:
"A" (like Clipper) and it means "required" and "a" (like clipper) but it means "not required". On the other hand, there is another parameter at the end of the QT inputmask and its significate is: instead space what is the "null" character to fill out the string? For example, you can create this Qt inputmask: "NnN;*" and enter "A2b" or enter "A b" but you will see "A*b". Output text must be 3 length.
About other I must investigate. Thanks for you notice.
@Rathinagiri.
At this moment, ALL datatype are left aligned in every condition (editing and viewing). I have forced right alignment for TXT_NUMERIC while viewing; I thought: can be the default for numeric value. So, I can leave left aligned every data type and must be the programmer who uses RIGHTALIGN option (like in this demo for textbox). The internal trick is to use the alignment; it does not affect the source code needed to handle the insertion of characters.
On the other hand, HMG3 has only one option: RIGHTALIGN and numeric value are always right align.
I can think other solution, but it requires a new "option" for numeric value.....
Thanks to everyone
Cheers
Luigi from Italy
www.L3W.it
www.L3W.it
Re: Please show your most complex PICTURE
Hi @Mol
You are right: I made a mistake while writing demo with commands. In fact, with the OOP version, works fine
See "CASECONVERT TXT_UPPER": must be "CASECONVERT UPPER".
Cheers.
You are right: I made a mistake while writing demo with commands. In fact, with the OOP version, works fine
See "CASECONVERT TXT_UPPER": must be "CASECONVERT UPPER".
Cheers.
Luigi from Italy
www.L3W.it
www.L3W.it