Page 1 of 1

Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Fri Mar 09, 2012 5:51 am
by Wolfgang Ciriack
Hi Roger and all,
perhaps someone can help me with the some problems:

1. I have a static (red) which i want to stay below the BROWSE when resizing the window. What i ever tried, i don't succeed.

2. When selecting the menu from a button (f.e. "Grunddaten") and don't select an item - click anywhere, that the menu disappear - the next click on a button does not work, i allways have to click a second time.

3. If i use CJMONTHCALENDAR (activate #define CODEJOCKCAL), how can i react to a selection (mouse click) of a day ?

Attached is a testprogram.

Re: Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Mon Mar 12, 2012 12:39 am
by Wolfgang Ciriack
Hi Roger,
can you please have a look at this ?

Re: Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Tue Mar 27, 2012 8:29 am
by rdonnay
Wolfgang -

Sorry. I just found this posting. I will look at it today.

Re: Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Tue Mar 27, 2012 8:57 am
by rdonnay
This works for me:

Code: Select all

@oDrawingArea:currentSize()[2]-320,5 DCSTATIC TYPE XBPSTATIC_TYPE_TEXT OBJECT oStatCal SIZE DCGUI_PARENTWIDTH -10,230 ;
       PARENT oStatic6 ;
       RESIZE DCGUI_RESIZE_RESIZEONLY_X ;   // <<<<<<<<<<<<<<<<<<<<<<<
       COLOR GRA_CLR_WHITE, GRA_CLR_RED ;
       CAPTION 'Here I am' FONT '16.Arial Bold'

Re: Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Tue Mar 27, 2012 10:43 am
by Wolfgang Ciriack
Thanks Roger for looking at this, but with build 255 this dos not work.

More important for me is the button problem, perhaps you can have a look at it ?

Re: Problems with resizing and menu on DCPUSHBUTTONXP

Posted: Tue Mar 27, 2012 12:57 pm
by rdonnay
I don't have any problem with the resizing change I made, even with build 255.

About the menu problem:

After lots of different workaround trials, I came to the realization that this is a problem with the :popUp() method of XbpMenu().
It interferes with the events if the menu is not selected and causes an xbeP_ActivateItem event to be generated instead of an xbeP_Activate event to be generated when clicked on any pushbutton object. I don't have a simple answer to this problem but I will try to find another workaround. This is an Xbase++ bug.