hmg-4 Changelog

Moderator: Rathinagiri

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: hmg-4 Changelog

Post by Ricci » Sun Jan 08, 2012 6:27 pm

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.

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Mon Jan 09, 2012 7:11 am

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++.

User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Post by l3whmg » Mon Jan 09, 2012 8:54 pm

Hi Ricci,
many thanks for these update. Please, can you show an usage of Cargo?
Cheers
Luigi from Italy
www.L3W.it

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Tue Jan 10, 2012 5:53 am

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.

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Tue Jan 10, 2012 8:10 am

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.).

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Tue Jan 10, 2012 9:36 am

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

Post Reply