Page 2 of 2

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Thu Apr 27, 2017 11:27 am
by serge_girard
Ok, I see! Thx

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Thu Apr 27, 2017 11:54 am
by serge_girard
To Grigory:

Apparantly this also works:

Code: Select all

DEFINE IMAGE Image_3
      ROW	 0
      COL	162
      HEIGHT  30
      WIDTH   40
      PICTURE	'NM1.JPG'
      ONCLICK RESIZE_NM()
      STRETCH	.F.
      ADJUSTIMAGE .T.
      ON GOTFOCUS this.picture  := "NM2.JPG"  
      ON LOSTFOCUS this.picture := "NM1.JPG"
END IMAGE
ON GOTFOCUS this.picture := "NM2.JPG"
ON LOSTFOCUS this.picture := "NM1.JPG"

But not documented!

Serge

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Thu Apr 27, 2017 2:50 pm
by mlnr
But, it would be great to be able to change the button's background color with transparent image.

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Thu Apr 27, 2017 6:49 pm
by mol
I'm using labels for colored pictures. The only one problem is label has no focus anytime, so, it's not possible to move to label via Tab key.

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Sun Apr 30, 2017 8:00 pm
by KDJ
gfilatov wrote: Wed Apr 26, 2017 1:11 pm MiniguiEx have not an Unicode support because it is no need for the latin or cyrillic based languages (in Europe and USA).
The DBF format also have a bad support for Unicode AFAIK. :?
Hi Grigory

Please tell me what is bad in DBF with Unicode?

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Mon May 01, 2017 4:14 pm
by gfilatov
KDJ wrote: Sun Apr 30, 2017 8:00 pm Please tell me what is bad in DBF with Unicode?
Hi Krzysztof,

Please take a look for the following discussions at the Harbour developer forum:

https://groups.google.com/forum/#!searc ... i8t1Z083UJ

https://groups.google.com/forum/#!searc ... Z982GRHacJ
> Can anybody shed some light on the matter ? What is the danger we are
> facing storing UNICODE to DBF ?

The problems are exactly the same as in any other database
storage systems. If you are using fixed size byte oriented
fields then they may be to small for some texts encoded in
form which can use more then one byte for single character,
i.e. UTF8. It means that you have to create wider fields
or use variable length fields or use fields which do not
use bytes to store characters, i.e. 16bit entries (it's the
method comonly used in most of RDBMS for so called unicode
character fields though it only reduces the problem but not
resolves it because some unicode characters have bigger
value then 0xFFFF and have to be encoded in more then one
16bit entry, just like in UTF8).
So there is nothing specific to DBF in this subject.
It's as good storage as any other one and has exactly the
same problems as any other database systems.

In Harbour we do not have documented interface to create
tables with 16bit unicode character fields. They are fully
supported by our DBF* RDDs but you cannot define them in
dbCreate(). I plan to add documented support for it in some
spare time.
That's nearly all.
There is also yet another question about padding of field
with multibyte characters in read and wrtie operations.
We have the following options:
1. read:
a) return decoded string in raw form.
it means that it can has less characters then bytes
b) if after decoding string has less characters then
bytes (field size) then pad it with spaces
2. write when there is not enough room to save multibyte
character (field end)
a) store only part of character
b) do not store anything and fiil the rest of field with
spaces
c) use some special characters to mark it, i.e. '?'

There is not perfect choice. There are situations when
some solutions are strongly preffered before other.
Current DBF* implementation in Harbour realize 1a and 2b.
Hope that useful :idea:

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Mon May 01, 2017 4:18 pm
by andyglezl
I've added a small form template with flat design using ButtonEX. It can be compiled only with MiniGUI but i've included the exe file in case someone just wants to check it out.

Hace tiempo, con este ejemplo hice algo parecido en HMG.
-------------------------------------------------------------------------
Long ago, with this example I did something similar in HMG.
CAS-Cool Button.jpg
CAS-Cool Button.jpg (64.01 KiB) Viewed 5697 times

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Mon May 01, 2017 4:35 pm
by Pablo César
I love UNICODE.

I think it the best things that happend in HMG with Dr. Claudio implements.

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Mon May 01, 2017 7:05 pm
by KDJ
Grigory

Thank you very much for the information.

It follows that it is not so bad.
You have to remember that we declare the size of the field in bytes rather than in characters.
So the length of character field should be 4 times greater than the number of characters you want to write.
For all European languages, you only need 2 times more.

Re: Harbour MiniGUI Extended Edition build 17.04 is published

Posted: Mon May 01, 2017 7:14 pm
by srvet_claudio
A character in UTF8 is encoded up to 4 bytes, old encodings of 5 bytes or more are now considered illegal.

Therefore the following rule is generally used: maximum length of the string in characters * 4, for example a field with a capacity of 20 characters in UTF8 must be 80 bytes of length.