Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10600 > unrolled thread

Rookie question about focus and buttons

Started byStu <stuart.mcalpine@ymail.com>
First post2017-05-23 07:25 -0700
Last post2017-06-06 07:44 +0200
Articles 7 — 5 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Rookie question about focus and buttons Stu <stuart.mcalpine@ymail.com> - 2017-05-23 07:25 -0700
    Re: Rookie question about focus and buttons Franz Rachbauer <office@rachbauer.org> - 2017-05-23 16:32 +0200
    Re: Rookie question about focus and buttons "Wolfgang Riedmann" <wriedmann@gmail.com> - 2017-05-24 08:01 +0200
      Re: Rookie question about focus and buttons stuart.mcalpine@ymail.com - 2017-05-24 03:23 -0700
        Re: Rookie question about focus and buttons Franz Rachbauer <office@rachbauer.org> - 2017-05-24 13:13 +0200
          Re: Rookie question about focus and buttons Stu <stuart.mcalpine@ymail.com> - 2017-05-25 01:18 -0700
    Re: Rookie question about focus and buttons Karl Wochele <kw@ecos-system.invalid> - 2017-06-06 07:44 +0200

#10600 — Rookie question about focus and buttons

FromStu <stuart.mcalpine@ymail.com>
Date2017-05-23 07:25 -0700
SubjectRookie question about focus and buttons
Message-ID<1d99e068-2fc5-4c12-9610-5de6bcd4cbc9@googlegroups.com>
Hi all

I've got a small app that I'm migrating to touchscreen.  I have a few SLE and have created large buttons for input into the SLE.

Dumb question I know, but how do I return focus to the appropriate SLE after the button is clicked?

I can't seem to suss out how to determine where to return focus to.

Many thanks.

[toc] | [next] | [standalone]


#10601

FromFranz Rachbauer <office@rachbauer.org>
Date2017-05-23 16:32 +0200
Message-ID<og1h5i$nnu$1@gioia.aioe.org>
In reply to#10600
Use oDCSle:SetFocus() to set focus to sle.
Regards, Franz

Am 23.05.2017 um 16:25 schrieb Stu:
> Hi all
>
> I've got a small app that I'm migrating to touchscreen.  I have a few SLE and have created large buttons for input into the SLE.
>
> Dumb question I know, but how do I return focus to the appropriate SLE after the button is clicked?
>
> I can't seem to suss out how to determine where to return focus to.
>
> Many thanks.
>

[toc] | [prev] | [next] | [standalone]


#10602

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2017-05-24 08:01 +0200
Message-ID<eoklu7FeulaU1@mid.individual.net>
In reply to#10600
Hi Stu,

> I've got a small app that I'm migrating to touchscreen.  I have a few
> SLE and have created large buttons for input into the SLE.
> 
> Dumb question I know, but how do I return focus to the appropriate
> SLE after the button is clicked?
> 
> I can't seem to suss out how to determine where to return focus to.

declare an own class for the pushbutton and put a reference of the
correct SLE to the pushbutton class. After the button click, you can
retrieve the SLE object from the pressed pushbutton and set the focus
there.

Wolfgang



-- 

[toc] | [prev] | [next] | [standalone]


#10603

Fromstuart.mcalpine@ymail.com
Date2017-05-24 03:23 -0700
Message-ID<a37f0fc2-de26-45f7-93a1-c3d34e8aa52e@googlegroups.com>
In reply to#10602
On Wednesday, 24 May 2017 07:01:45 UTC+1, Wolfgang Riedmann  wrote:
> Hi Stu,
> 
> > I've got a small app that I'm migrating to touchscreen.  I have a few
> > SLE and have created large buttons for input into the SLE.
> > 
> > Dumb question I know, but how do I return focus to the appropriate
> > SLE after the button is clicked?
> > 
> > I can't seem to suss out how to determine where to return focus to.
> 
> declare an own class for the pushbutton and put a reference of the
> correct SLE to the pushbutton class. After the button click, you can
> retrieve the SLE object from the pressed pushbutton and set the focus
> there.
> 
> Wolfgang
> 
> 
> 
> --

Hi Wolfgang

Many thanks.  That's exactly what I'm trying to achieve.

I couldn't trouble you to reference a short example of code?

Many thanks again.

[toc] | [prev] | [next] | [standalone]


#10604

FromFranz Rachbauer <office@rachbauer.org>
Date2017-05-24 13:13 +0200
Message-ID<og3psn$fts$1@gioia.aioe.org>
In reply to#10603
On the fly (simple):
//-----------------------------------------//
CLASS MyPushButton INHERIT PushButton
EXPORT _oSle AS SingleLineEdit

METHOD LinkSleToButton(oSle) CLASS MyPushButton
_oSle := oSle	// save Sle at button
RETURN SELF
//-----------------------------------------//
METHOD ButtonClick(oCE) CLASS dtaMain
IF oCE:Control:NameSym == #pshFillSle	// identify the button(s)
	oCE:Control:_oSle:TextValue := "XYZ"
	oCE:Control:_oSle:SetFocus()
ENDIF
RETURN SUPER:ButtonClick(oCE)

METHOD PostInit() CLASS dtaMain
oCCpshFillSle:LinkSleToButton(oDCSleFillSle)
RETURN SELF
//----------------------------------------//

The button pshFillSle has to be inherited from MyPushButton in designer. 
I think thats one way Wolfgang ment.

Regards Franz

Am 24.05.2017 um 12:23 schrieb stuart.mcalpine@ymail.com:
> On Wednesday, 24 May 2017 07:01:45 UTC+1, Wolfgang Riedmann  wrote:
>> Hi Stu,
>>
>>> I've got a small app that I'm migrating to touchscreen.  I have a few
>>> SLE and have created large buttons for input into the SLE.
>>>
>>> Dumb question I know, but how do I return focus to the appropriate
>>> SLE after the button is clicked?
>>>
>>> I can't seem to suss out how to determine where to return focus to.
>>
>> declare an own class for the pushbutton and put a reference of the
>> correct SLE to the pushbutton class. After the button click, you can
>> retrieve the SLE object from the pressed pushbutton and set the focus
>> there.
>>
>> Wolfgang
>>
>>
>>
>> --
>
> Hi Wolfgang
>
> Many thanks.  That's exactly what I'm trying to achieve.
>
> I couldn't trouble you to reference a short example of code?
>
> Many thanks again.
>

[toc] | [prev] | [next] | [standalone]


#10605

FromStu <stuart.mcalpine@ymail.com>
Date2017-05-25 01:18 -0700
Message-ID<e3730e98-fb8f-4b0e-a11b-2f467a878f44@googlegroups.com>
In reply to#10604
Thank you Franz.  I understand now.

I appreciate you taking the time to help.

 

On Wednesday, 24 May 2017 12:13:29 UTC+1, Franz Rachbauer  wrote:
> On the fly (simple):
> //-----------------------------------------//
> CLASS MyPushButton INHERIT PushButton
> EXPORT _oSle AS SingleLineEdit
> 
> METHOD LinkSleToButton(oSle) CLASS MyPushButton
> _oSle := oSle	// save Sle at button
> RETURN SELF
> //-----------------------------------------//
> METHOD ButtonClick(oCE) CLASS dtaMain
> IF oCE:Control:NameSym == #pshFillSle	// identify the button(s)
> 	oCE:Control:_oSle:TextValue := "XYZ"
> 	oCE:Control:_oSle:SetFocus()
> ENDIF
> RETURN SUPER:ButtonClick(oCE)
> 
> METHOD PostInit() CLASS dtaMain
> oCCpshFillSle:LinkSleToButton(oDCSleFillSle)
> RETURN SELF
> //----------------------------------------//
> 
> The button pshFillSle has to be inherited from MyPushButton in designer. 
> I think thats one way Wolfgang ment.
> 
> Regards Franz
> 
> Am 24.05.2017 um 12:23 schrieb stuart.mcalpine@ymail.com:
> > On Wednesday, 24 May 2017 07:01:45 UTC+1, Wolfgang Riedmann  wrote:
> >> Hi Stu,
> >>
> >>> I've got a small app that I'm migrating to touchscreen.  I have a few
> >>> SLE and have created large buttons for input into the SLE.
> >>>
> >>> Dumb question I know, but how do I return focus to the appropriate
> >>> SLE after the button is clicked?
> >>>
> >>> I can't seem to suss out how to determine where to return focus to.
> >>
> >> declare an own class for the pushbutton and put a reference of the
> >> correct SLE to the pushbutton class. After the button click, you can
> >> retrieve the SLE object from the pressed pushbutton and set the focus
> >> there.
> >>
> >> Wolfgang
> >>
> >>
> >>
> >> --
> >
> > Hi Wolfgang
> >
> > Many thanks.  That's exactly what I'm trying to achieve.
> >
> > I couldn't trouble you to reference a short example of code?
> >
> > Many thanks again.
> >

[toc] | [prev] | [next] | [standalone]


#10649

FromKarl Wochele <kw@ecos-system.invalid>
Date2017-06-06 07:44 +0200
Message-ID<oh5ff7$26a$1@solani.org>
In reply to#10600
Hi,

in a subclass of Pushbutton you can use

Method Dispatch(oE) class MyPushButton
local liRt as int

do case
case oE:Message = WM_MOUSEACTIVATE
	lIRt := MA_NOACTIVATEANDEAT
else
	liRT := super:Dispatch(oE)
endif

return liRt

HTH
Karl


Am 23.05.2017 um 16:25 schrieb Stu:
> Hi all
>
> I've got a small app that I'm migrating to touchscreen.  I have a few SLE and have created large buttons for input into the SLE.
>
> Dumb question I know, but how do I return focus to the appropriate SLE after the button is clicked?
>
> I can't seem to suss out how to determine where to return focus to.
>
> Many thanks.
>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web