Page 12 of 16

Re: HMG 4 Started

Posted: Tue Aug 17, 2010 8:08 pm
by Roberto Lopez
rathinagiri wrote:Yes. So, shall I co-ordinate with the shared properties?

I think color is taken by Marek. The only property unattended in checkbox which is common is transparent. Shall I take that one and try on?
I've just took color from Marek to to move it to control class and solve some problems.

Yes, you can try transparent with a little advise: If a specific property is not directly supported by QT, I guess that this is not the moment to stop at esoteric solutions :)

ie: maxLength (EditBox) is not supperted by QTextEdit() so, I've documented the situation and going on with another thing.

When we finished with functionality directly supported by QT, we will focus on tricks to support the other things (hopefully, by that time we will acquired the needed experience and knowledge).

Re: HMG 4 Started

Posted: Tue Aug 17, 2010 8:14 pm
by Roberto Lopez
Roberto Lopez wrote:
rathinagiri wrote:Yes. So, shall I co-ordinate with the shared properties?

I think color is taken by Marek. The only property unattended in checkbox which is common is transparent. Shall I take that one and try on?
I've just took color from Marek to to move it to control class and solve some problems.

Yes, you can try transparent with a little advise: If a specific property is not directly supported by QT, I guess that this is not the moment to stop at esoteric solutions :)

ie: maxLength (EditBox) is not supperted by QTextEdit() so, I've documented the situation and going on with another thing.

When we finished with functionality directly supported by QT, we will focus on tricks to support the other things (hopefully, by that time we will acquired the needed experience and knowledge).
And perhaps this is a good moment to add a text file at SVN to document these situations...

Re: HMG 4 Started

Posted: Tue Aug 17, 2010 8:19 pm
by Roberto Lopez
esgici wrote:
Roberto Lopez wrote: Really nice... :)
As I've said, it looks hard at the beginning, but it can be extremely useful when you are handling a complex situation...
Thanks, please continue :D

Best regards

--

Esgici
Well... the last chapter...

You'll find references to 'self'.

Self is used to refer to the class object itself.

So, you'll find the the 'new' method in the control class return 'self' whenis called, giving...

oButton := Button:New()

Since new() method return 'self' oButton variable holds the object (as simple as that).

Class variables must be reference in this way:

::xVar

form the class methods.

And this is all... (I'm going to work in color properties).

Please, review the code, create your own class for do tests you should be ready soon...

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 11:53 am
by mol
I'm working over AutoSize property of label.
It's almost done, but, I can't calculate text width with function GetTextWidth.
I think, this function is placed in libhbwin.a library, but compilator can't find it?
What's going on?

PS. I've realized Alignment property and added new properties: WordWrap and VAlignment (vertical alignment)...
Marek

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 12:05 pm
by mol
I've prepared label.prg and demo_4.prg
Please test it.
Marek

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 12:05 pm
by esgici
Roberto Lopez wrote:
Well... the last chapter...

... review the code, create your own class for do tests you should be ready soon...
Thanks a lot Maestro :D

--

Esgici

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 12:52 pm
by sudip
FontColor, BackColor, Visible property connected to Spinner
modified source/spinner.prg

Hello Roberto,

How is your health :) (I read you got fever)

If TextBox control is free, may I work on it after finishing Spinner?

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 1:31 pm
by Roberto Lopez
mol wrote:I'm working over AutoSize property of label.
It's almost done, but, I can't calculate text width with function GetTextWidth.
I think, this function is placed in libhbwin.a library, but compilator can't find it?
What's going on?

PS. I've realized Alignment property and added new properties: WordWrap and VAlignment (vertical alignment)...
Marek
libhbwin gives support for Windows only. Please, consider that we are working on a multi-platform project. Please, if you used, eliminate any reference to that.

Moreover, the goal to this first stage is to mimic as good as possible the current HMG features, please, do not add new functionality yet.

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 1:31 pm
by Roberto Lopez
sudip wrote:FontColor, BackColor, Visible property connected to Spinner
modified source/spinner.prg

Hello Roberto,

How is your health :) (I read you got fever)

If TextBox control is free, may I work on it after finishing Spinner?
I'm a little better, thanks!

Please, go on with TextBox.

Re: HMG 4 Started

Posted: Wed Aug 18, 2010 1:38 pm
by mol
I can't see possibility to realize AutoSize property without GetTextWidth.
I'll read QT doc. Maybe there is a resolve of problem.