Page 1 of 1

Possible bug...

Posted: Fri Nov 25, 2011 6:05 pm
by Roberto Lopez
Hi All,


I've created a simple program that has a frame and inside it a button.

When the button is inside frame, the action (click) event don't work.

If you simply move the button outside frame, it works perfectly.

This is the form code:

Code: Select all

* HMG-IDE Form Designer Generated Code
* (c) Roberto Lopez - http://sites.google.com/site/hmgweb

DEFINE WINDOW TEMPLATE AT 240 , 298 WIDTH 681 HEIGHT 414 VIRTUAL WIDTH Nil VIRTUAL HEIGHT Nil TITLE "Hello World!" ICON NIL MAIN CURSOR NIL ON INIT Nil ON RELEASE Nil ON INTERACTIVECLOSE Nil ON MOUSECLICK Nil ON MOUSEDRAG Nil ON MOUSEMOVE Nil ON SIZE Nil ON MAXIMIZE Nil ON MINIMIZE Nil ON PAINT Nil BACKCOLOR Nil NOTIFYICON NIL NOTIFYTOOLTIP NIL ON NOTIFYCLICK Nil ON GOTFOCUS Nil ON LOSTFOCUS Nil ON SCROLLUP Nil ON SCROLLDOWN Nil ON SCROLLLEFT Nil ON SCROLLRIGHT Nil ON HSCROLLBOX Nil ON VSCROLLBOX Nil

    DEFINE BUTTON Button_1
        ROW    160
        COL    270
        WIDTH  100
        HEIGHT 28
        ACTION main_button_1_action()
        CAPTION "Click Me!"
        FONTNAME "Arial"
        FONTSIZE 9
        TOOLTIP ""
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        ONGOTFOCUS Nil
        ONLOSTFOCUS Nil
        HELPID Nil
        FLAT .F.
        TABSTOP .T.
        VISIBLE .T.
        TRANSPARENT .F.
        MULTILINE .F.
        PICTURE Nil
        PICTALIGNMENT TOP
    END BUTTON

    DEFINE FRAME Frame_1
        ROW    100
        COL    250
        WIDTH  140
        HEIGHT 140
        FONTNAME "Arial"
        FONTSIZE 9
        FONTBOLD .F.
        FONTITALIC .F.
        FONTUNDERLINE .F.
        FONTSTRIKEOUT .F.
        CAPTION "Frame_1"
        BACKCOLOR NIL
        FONTCOLOR NIL
        OPAQUE .T.
    END FRAME

END WINDOW


Re: Possible bug...

Posted: Fri Nov 25, 2011 10:29 pm
by Ricci
Try to define the frame before the button .... maybe the button is covered by the frame.

Re: Possible bug...

Posted: Fri Nov 25, 2011 11:45 pm
by Roberto Lopez
Ricci wrote:Try to define the frame before the button .... maybe the button is covered by the frame.
Inverting the order, it works well.

Is this 'fixable', or is a QT behavior ?

Re: Possible bug...

Posted: Sat Nov 26, 2011 12:02 am
by mrduck
Roberto Lopez wrote:
Ricci wrote:Try to define the frame before the button .... maybe the button is covered by the frame.
Inverting the order, it works well.

Is this 'fixable', or is a QT behavior ?
I don't have the "right " answer, but I can say that in some tests I had widgets covered by other transparent objects (so the objects were visible) but I was not able to interact with them.

Re: Possible bug...

Posted: Sat Nov 26, 2011 12:10 am
by Roberto Lopez
mrduck wrote:
Roberto Lopez wrote:
Ricci wrote:Try to define the frame before the button .... maybe the button is covered by the frame.
Inverting the order, it works well.

Is this 'fixable', or is a QT behavior ?
I don't have the "right " answer, but I can say that in some tests I had widgets covered by other transparent objects (so the objects were visible) but I was not able to interact with them.
Ok.

I guess that we should create some kind of FAQ, to help users porting its applications to HMG.4 on things like this...

Re: Possible bug...

Posted: Sat Nov 26, 2011 1:25 am
by danielmaximiliano
Roberto Lopez wrote:

I guess that we should create some kind of FAQ, to help users porting its applications to HMG.4 on things like this...
Buena idea Roberto, es bueno tener reunidas la informacion por tipo de controles, hace mucho me habia sucedido esto mismo con hmg3.0.x y la solucion fue la misma. no entendia si Frame Control es un contenedor o simplemente un recuadro dentro de una ventana.
un Faq ordenado por tipo de control, y los controles ordenados por nombre alfabetico como en el HMG Reference.
aqui en el foro esta toda esa informacion pero desparramada en distintos sitios y a veces se postea lo mismo sin saber que otro usuario ya lo ha hecho anteriormente. pero lo bueno es que un usuario de hmg te encamina hacia la solucion proponiendo una idea o enviandote al post correspondiente.

Re: Possible bug...

Posted: Sat Nov 26, 2011 7:32 am
by Ricci
Roberto Lopez wrote: Inverting the order, it works well.

Is this 'fixable', or is a QT behavior ?
A frame in Qt is a real object ( a QGroupBox) not only 4 drawed lines. So the user must respect the Z-order (the top-most "wins").