PushButton can perform 2 diferent actions?

This forum is for eXpress++ general support.
Message
Author
User avatar
hz_scotty
Posts: 107
Joined: Thu Jan 28, 2010 8:20 am
Location: Wr.Neustadt / Österreich

Re: PushButton can perform 2 diferent actions?

#11 Post by hz_scotty »

Now it works!
Thank you
best regards
Hans

User avatar
PedroAlex
Posts: 234
Joined: Tue Feb 09, 2010 3:06 am

Re: PushButton can perform 2 diferent actions?

#12 Post by PedroAlex »

Roger.
Thanks for this new feature.
I've tried and done what I need.
I simply replaces the PRG (_dcgetbx.pr, _dcxbrow.prg, _dcxbutt.prg) and compiled.
But now I have a new problem:
The Enter does not change the field cursor.
Could you see what's going on?
Attached Small sample.

xBase 2.0.1095.

best regards
Attachments
TestGet.rar
(666 Bytes) Downloaded 847 times
Pedro Alexandre

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: PushButton can perform 2 diferent actions?

#13 Post by rdonnay »

1467. In build 265, 2 new Get-Set functions were added due to complaints from
eXpress++ users that they wanted to control the behavior of the
SetInputFocus and KillInputFocus behaviors of DCGET objects. Those
functions are DC_XbpGetSetInputFocusBlock() and
DC_XbpGetKillInputFocusBlock(). They are used to set a code block for
the entire application's DCGET behavior. Now there has been some
complaints that when this was implemented the default behavior also
changed. If you want the same behavior as in builds 264 and earlier
then add the following to the beginning of your application:

Code: Select all

     DC_XbpGetSetInputFocusBlock(;
           {|x,y,o| IIF(o:isGetDataOnLostFocus,o:getData(),nil), ;
               IIF(!Empty(o:get:buffer),o:get:pos := o:savePos,nil), ;
               o:DateFlag := .T., ;
               o:home(), ;
               DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
               DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS]), ;
               DC_PopupButtonShow(o,.t.)})

       DC_XbpGetKillInputFocusBlock(;
           {|x,y,o| o:savePos := o:get:pos, ;
               o:DateFlag := .T., ;
               IIF(o:isGetDataOnLostFocus,o:getData(),nil), ;
               IIF(o:isGetDataOnLostFocus,o:setData(),nil), ;
               o:Home(), ;
               DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
               DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS])}, ;
               DC_PopupButtonShow(o,.f.)})
The eXpress train is coming - and it has more cars.

skiman
Posts: 1195
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: PushButton can perform 2 diferent actions?

#14 Post by skiman »

Hi,

While experimenting with the latest version, i came to a little problem in the above sample.

Code: Select all

DC_XbpGetKillInputFocusBlock(;
           {|x,y,o| o:savePos := o:get:pos, ;
               o:DateFlag := .T., ;
               IIF(o:isGetDataOnLostFocus,o:getData(),nil), ;
               IIF(o:isGetDataOnLostFocus,o:setData(),nil), ;
               o:Home(), ;
               DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
               DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS])}, ;     <---------- } gives an error
               DC_PopupButtonShow(o,.f.)})
These is a } which shouldn't be there.

Code: Select all

DC_XbpGetKillInputFocusBlock(;
           {|x,y,o| o:savePos := o:get:pos, ;
               o:DateFlag := .T., ;
               IIF(o:isGetDataOnLostFocus,o:getData(),nil), ;
               IIF(o:isGetDataOnLostFocus,o:setData(),nil), ;
               o:Home(), ;
               DC_HiliteGets(o,1,o:getList:getOptions[nGETOPT_HILITECOLOR]), ;
               DC_ColorGets(o,1,o:getList:getOptions[aGETOPT_COLORGETS]), ;      <----------- } has to be deleted
               DC_PopupButtonShow(o,.f.)})
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: PushButton can perform 2 diferent actions?

#15 Post by rdonnay »

Chris -

Thanks for finding and reporting that sample code error in README.TXT.
The eXpress train is coming - and it has more cars.

Post Reply