Page 30 of 30

Re: hmg-4 Changelog

Posted: Sun Jan 08, 2012 6:27 pm
by Ricci

Code: Select all

2012-01-08 19:20 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de )
   * source/textboxsimple.prg
     ! READONLY now use QLineEdit:setReadOnly instead of :disabled,
       the text can be marked and copied as in HMG3
   * include/hmg.ch
     only cosmetic changes
When using the READONLY command in HMG4 the object state is set to :disabled. A disabled object will not response to mouse or keyboard. Using READONLY in TEXTBOX or TEXTBOXSIMPLE has the result that the text cannot be marked and copied into the clipboard.

For TEXTBOXSIMPLE you can use READONLY now to set the object state to ReadOnly, the text can´t be changed but marked and copied.
Use ENABLED .F. / oObject:Enabled(.F.) to set it into a disabled status.

Re: hmg-4 Changelog

Posted: Mon Jan 09, 2012 7:11 am
by Ricci

Code: Select all

2012-01-09 08:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de )
   * source/basic.prg
     + Method cargo( xValue )
       xValue is an instance variable for free use in every control
Now you can store additional information in any control instead of using private or public vars. The cargo element is common in CLIPPER OOP and Alaska XBase++.

Re: hmg-4 Changelog

Posted: Mon Jan 09, 2012 8:54 pm
by l3whmg
Hi Ricci,
many thanks for these update. Please, can you show an usage of Cargo?
Cheers

Re: hmg-4 Changelog

Posted: Tue Jan 10, 2012 5:53 am
by Ricci
l3whmg wrote:Please, can you show an usage of Cargo?
Hi Luigi,

here is a simple usage from my orchid program:

The name of the plant is displayed using HTML text in a Label control, it looks like Dendrobium bicolor or Dendrobium biscolor and so on, depending if it is a valid, wrong or unknown name.
In another part of the program I need the content of this label without the HTML code (the plant name). So I store the visible HTML part into the labels value and the pure name into the cargo.

Using the cargo element is a way to extend a single control in a form a little bit without using inheritance.

Re: hmg-4 Changelog

Posted: Tue Jan 10, 2012 8:10 am
by Ricci

Code: Select all

2012-01-10 09:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de )
   * source/textbox.prg
   * source/editbox.prg
     ! READONLY now use Qt :setReadOnly instead of :disabled,
       the text can be marked and copied as in HMG3,
       in readonly mode the background is transparent as in HMG3
Hmmm ... the readonly status is ignored in textbox at the moment, the field looks like readonly but is still editable.

Luigi, can you solve this? There should be a different behavior between :readonly(.T.) and :enabled(.F.).

Re: hmg-4 Changelog

Posted: Tue Jan 10, 2012 9:36 am
by Ricci

Code: Select all

2012-01-10 09:00 UTC+0100 Ricci Zepmeusel ( ricci at conzoft.de )
   * source/numgetc.prg
     ! READONLY now use Qt :setReadOnly instead of :disabled,
       because NUMGETC is based on LABEL text can´t be copied,
       in readonly mode the background is transparent as in HMG3
   * source/dateget.prg
     ! READONLY now use Qt :setReadOnly instead of :disabled,
       the text can be marked and copied as in HMG3,
       in readonly mode the background is transparent as in HMG3