I'll try to find a way for that hbmk2 pick it from its library... I'll keep you posted.mol wrote:Of course, I've set it for testing only.Roberto Lopez wrote:Excepting for NtoC, it is working nicely.
I have only one objection: If the user do not specify a color, we should leave to QT to use the default colors for the control.
So, if a color == NIl we should do nothing for it.
NtoC was copied from harbour distribution. I can work on another conversion method. What do you think?
HMG 4 Started
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 4 Started
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 4 Started
You must add -lhbct to your HBMK2 line in build.batmol wrote:Code changing colors should look like:but, while compiling, I get an error about not found function NTOCCode: Select all
if ValType(::aFontColor) == 'U' xForeColor := '#000000;' else xForeColor := '#'+NtoC(aFontColor[1],16,2)+NtoC(aFontColor[2],16,2)+NtoC(aFontColor[3],16,2)+';' endif cStyleSheet += 'color:'+xForeColor + ';' if ValType(::aBackColor) == 'A' cStyleSheet += 'background-color:#'+NtoC(aBackColor[1],16,2)+NtoC(aBackColor[2],16,2)+NtoC(aBackColor[3],16,2)+';' endif if !empty(cStyleSheet) ::oQTObject:setStyleSheet(cStyleSheet) endif
I need simple conversion from numbers to hex to paste color in #RRGGBB format.
HBMK2 %1 -Lc:\HMG.4\qt\lib -lhbct
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 4 Started
The library is correctly linked, but apparently there is a problem with your code.Roberto Lopez wrote: You must add -lhbct to your HBMK2 line in build.bat
HBMK2 %1 -Lc:\HMG.4\qt\lib -lhbct
I've got working typing the color directly (ie: #00ff00 for green).
Appears to be that the color string is not correctly built.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: HMG 4 Started
Thanks a lotRoberto Lopez wrote: ... so I'll encourage you a little more
Now I understand better object - class relationship.
I'll wait eagerly.Roberto Lopez wrote: To be continued...
Best regards
--
Esgici
Viva INTERNATIONAL HMG
Re: HMG 4 Started
Hello Esgici,
I am also learning with you
Thank you and Roberto
I am also learning with you
Thank you and Roberto
With best regards,
Sudip
Sudip
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 4 Started
Well...esgici wrote: I'll wait eagerly.
oButton := Button:Create()
'Create' in OOP slang is a 'method' but, just between us, you can think about it just like a function (or procedure).
The advantage of a method is that it is 'inside' a class, so...
Button:Create()
is different that
TextBox:Create()
You are invoking methods (procedures) called the same but they are different ones, coded in different classes.
One of the big things about OOP is inheritance.
All control classes are defined to 'inherit' from control class.
This is written as follows (ie: button class):
CLASS BUTTON FROM CONTROL
Meaning that button control can use properties event and methods defined in control class.
So, you must code (ie) Row property once and it is automatically available for all other controls.
You must write new code only for controls that need a special treatment for the same property, event or method.
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...
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 4 Started
Yes, Roberto.
It is only a starting trouble.
Now, shall I start working on another control or the missing common properties of checkbox?
It is only a starting trouble.
Now, shall I start working on another control or the missing common properties of checkbox?
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.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMG 4 Started
IMHO, the best way to go is that we finish 'our' controls before to start working in another one, but coordinating the work to not overlap us in the case of shared properties (located at Control class).rathinagiri wrote:Yes, Roberto.
It is only a starting trouble.
Now, shall I start working on another control or the missing common properties of checkbox?
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMG 4 Started
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 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?
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.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: HMG 4 Started
Thanks, please continueRoberto 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...
Best regards
--
Esgici
Viva INTERNATIONAL HMG