Page 1 of 1

Problems in Class Window, Statusbar e Browse

Posted: Thu Jul 21, 2011 6:17 pm
by pctoledo
Friends, I am testing the HMG4, I noticed that some commands are with problems:

In Class Window:
:MinButton
:MaxButton
:Sizable
:Minimize
:Maximize
:Sizable (NoSize)

Samples 1:

Code: Select all

FUNCTION Main

   LOCAL oWindow

   HbQt_ErrorSys()

   WITH OBJECT oWindow := Window():New()
      :Row      := 10
      :Col      := 10
      :Width    := 400
      :Height   := 400
      :Title    := 'Nice OOP Demo!!!'
      :Type     := WND_MAIN
      :OnInit   := { || oWindow:Center() }
      :Minimize := .F.
   END WITH

   oWindow:Activate()

RETURN NIL
Image

Samples 2:

Code: Select all

FUNCTION Main

   LOCAL oWindow

   HbQt_ErrorSys()

   WITH OBJECT oWindow := Window():New()
      :Row      := 10
      :Col      := 10
      :Width    := 400
      :Height   := 400
      :Title    := 'Nice OOP Demo!!!'
      :Type     := WND_MAIN
      :OnInit   := { || oWindow:Center() }
      :Sizable  := .F.
   END WITH

   oWindow:Activate()

RETURN NIL
Image

In Class StatusBar:
:Width

Samples:

Code: Select all

FUNCTION Main

   HbQt_ErrorSys()

   DEFINE WINDOW Form_1              ;
      AT 0,0                         ;
      Width 600 Height 400           ;
      Title 'HMG StatusBar Demo'     ;
      Main                           ;
      Font 'Arial' Size 10           ;
      On Init { || Form_1.Center() }

      DEFINE STATUSBAR Font "Arial" Size 12
         StatusItem "Raised Clickable"  Width  500 RAISED ICON 'new.ico' ACTION MsgInfo( 'Click! 1' )
         StatusItem 'Flat Clickable!'   Width 100 FLAT   ICON 'car.ico' ACTION MsgInfo( 'Click! 2' )
      END STATUSBAR

   END WINDOW

   ACTIVATE WINDOW Form_1

RETURN NIL
Width 500 and Width 100

Image

In Class Browse:
Scrollbar color...

Samples compiled in 18/02/2011:
Image

Samples compiled in today:
Image

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 5:10 am
by Rathinagiri
Thanks for reporting. I will check what happened.

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 7:06 am
by mrduck
pctoledo wrote:Friends, I am testing the HMG4, I noticed that some commands are with problems:

In Class Window:
:MinButton
:MaxButton
:Sizable
:Minimize
:Maximize
:Sizable (NoSize)
Sizable method was not moved from window.prg to basic.prg, but Mauricio should have already commited the patch. I presume the other method have the same problem.
In Class Browse:
Scrollbar color...

Samples compiled in 18/02/2011:
Image

Samples compiled in today:
Image
I also noticed this problem.

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 11:44 am
by concentra
mrduck wrote:Sizable method was not moved from window.prg to basic.prg, but Mauricio should have already commited the patch. I presume the other method have the same problem.
Correct. Will revise the others.

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 11:53 am
by concentra
Hi.
To me :Sizable is working properly with current SVN.
But :minimize and :maximize are present but aren't SETGET methods...
Were them in the past ?

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 12:01 pm
by concentra
mrduck wrote:
In Class Browse:
Scrollbar color...

Samples compiled in 18/02/2011:
Image

Samples compiled in today:
Image
I also noticed this problem.
Isn't this QT DLLs version related ?

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 12:04 pm
by concentra
pctoledo wrote::MinButton
:MaxButton
This is also working to me in the current SVN...

Re: Problems in Class Window, Statusbar e Browse

Posted: Fri Jul 22, 2011 1:50 pm
by pctoledo
concentra wrote:To me :Sizable is working properly with current SVN.
concentra wrote:
pctoledo wrote::MinButton
:MaxButton
This is also working to me in the current SVN...
I updated HMG4 in the current SVN and are working.

thanks!

Re: Problems in Class Window, Statusbar e Browse

Posted: Sat Jul 23, 2011 11:37 am
by pctoledo
Friends, take a test compiling c:\hmg.4\samples\frame\demo_1.prg:

All right!
Image

Including: Sizable: =. F. in the Class Window, all other objects (Frame, Label, Button, etc.) disappear.

Image

Re: Problems in Class Window, Statusbar e Browse

Posted: Sat Jul 23, 2011 1:47 pm
by l3whmg
Hi, I'm thinking because within sizebale method you use ::oQtobject:layout().
Perhaps it's better to use:
::oQtObject:setMaximumWidth( nW )
::oQtObject:setMaximimHeight( nH )
::oQtObject:setMinimumWidth( nW )
::oQtObject:setMinimumHeight( nH )

where nW is current ::nWidth and nH is current ::nHeight (they must be setted)

On the other hand you have problem to disable: what are the initial MaximumWidth, MaximumHeight, MinimumWidth and MinimumHeight?
On QT docs they are: 16777215, 16777215, 0, 0; there is another way: good or not I don't know because I don't tested it.

Cheers