Possible bug...

Moderator: Rathinagiri

Post Reply
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Possible bug...

Post 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

Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: Possible bug...

Post by Ricci »

Try to define the frame before the button .... maybe the button is covered by the frame.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Possible bug...

Post 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 ?
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Re: Possible bug...

Post 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.
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Possible bug...

Post 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...
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: Possible bug...

Post 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.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Re: Possible bug...

Post 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").
Post Reply