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


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

"Jumping" tab control

Started byKrystian Besler <krystian.besler@gmail.com>
First post2014-03-18 16:19 -0700
Last post2014-03-20 00:19 -0700
Articles 8 — 4 participants

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


Contents

  "Jumping" tab control Krystian Besler <krystian.besler@gmail.com> - 2014-03-18 16:19 -0700
    Re: "Jumping" tab control Camille Kater <katercam@pt.lu> - 2014-03-19 08:18 +0100
    Re: "Jumping" tab control Krystian Besler <krystian.besler@gmail.com> - 2014-03-19 02:14 -0700
      Re: "Jumping" tab control Camille Kater <katercam@pt.lu> - 2014-03-19 13:08 +0100
        Re: "Jumping" tab control Krystian Besler <krystian.besler@gmail.com> - 2014-03-19 07:02 -0700
    Re: "Jumping" tab control "Jamal" <someone@example.com> - 2014-03-19 11:44 -0400
      Re: "Jumping" tab control Krystian Besler <krystian.besler@gmail.com> - 2014-03-19 09:08 -0700
        Re: "Jumping" tab control Steve E <steven_emmett@yahoo.co.uk> - 2014-03-20 00:19 -0700

#6681 — "Jumping" tab control

FromKrystian Besler <krystian.besler@gmail.com>
Date2014-03-18 16:19 -0700
Subject"Jumping" tab control
Message-ID<2860ada9-348c-4a38-97d1-413b2e1cb10e@googlegroups.com>
Hi,

I ask for help.
I have a data window with some pages of a tab control and some buttons; one of them are the prev and next buttons to navigate up and down through the database.
In the expose method I put the algorithm of retrieving data, and in prev/next buttons I must use SelectTab(#current tab) method, to force refreshing of the window. Now after pressing the button, the contents of the window "jumps" for a second. How to make the process more smooth or how to freeze the screen for the moment of changing the content ?

Thanks for suggestion
Krystian

[toc] | [next] | [standalone]


#6682

FromCamille Kater <katercam@pt.lu>
Date2014-03-19 08:18 +0100
Message-ID<532944CF.4020809@pt.lu>
In reply to#6681
Hello Krystian,

 > how to freeze the screen for the moment of changing the content ?
 >

at the beginning:
LockWindowUpdate( SELF:handle() )

at the end:
LockWindowUpdate( NULL_PTR )

Camille

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


#6683

FromKrystian Besler <krystian.besler@gmail.com>
Date2014-03-19 02:14 -0700
Message-ID<d3220d8f-caca-47e7-abc1-b43494788296@googlegroups.com>
In reply to#6681
On Wednesday, March 19, 2014 12:19:49 AM UTC+1, Krystian Besler wrote:
> Hi,
> 
> 
> 
> I ask for help.
> 
> I have a data window with some pages of a tab control and some buttons; one of them are the prev and next buttons to navigate up and down through the database.
> 
> In the expose method I put the algorithm of retrieving data, and in prev/next buttons I must use SelectTab(#current tab) method, to force refreshing of the window. Now after pressing the button, the contents of the window "jumps" for a second. How to make the process more smooth or how to freeze the screen for the moment of changing the content ?
> 
> 
> 
> Thanks for suggestion
> 
> Krystian

Hi Camille,

Thank you for answer, but unfortunately, things go from bad to worse.
I put the code in expose method :
IF SELF:oParent:Ini_expose1
 ret := LockWindowUpdate( SELF:handle() )

 SELF:oParent:Ini_expose1 := FALSE
 SELF:oParent:Akt_page := #Ko_1

 FOR i := Len(SELF:tab_pol) DOWNTO 1
  baza := SELF:tab_pol[i, 2]
  poleform := String2Symbol('oDC'+SELF:tab_pol[i, 1])

  IF SELF:xjaka_akcja = 'P' .OR. SELF:wypelnianie
   IVarGetSelf(SELF, poleform):value := baza:FIELDGET(SELF:tab_pol[i, 1])
  ELSE
   IVarGetSelf(SELF, poleform):value := SELF:tab_pol[i, 3]
  ENDIF
 NEXT

 LockWindowUpdate( NULL_PTR )
ENDIF

The window still blinks and - what is new, i loose colors on the form and the underlaying browser start to blink/jump for a moment.

Thanks for your advice - i get to know a new function/group of functions, but i ask for another suggestion.

Regards 
Krystian

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


#6684

FromCamille Kater <katercam@pt.lu>
Date2014-03-19 13:08 +0100
Message-ID<1395231715_3@vo.lu>
In reply to#6683
Hi,

I would try to avoid the expose() method for these things, as the 
expose() method gets called several times. Maybe transferring it in a 
postinit() method could avoid these "blinkings."

Camille


On 19/03/2014 10:14, Krystian Besler wrote:
> On Wednesday, March 19, 2014 12:19:49 AM UTC+1, Krystian Besler wrote:
>> Hi,
>>
>>
>>
>> I ask for help.
>>
>> I have a data window with some pages of a tab control and some buttons; one of them are the prev and next buttons to navigate up and down through the database.
>>
>> In the expose method I put the algorithm of retrieving data, and in prev/next buttons I must use SelectTab(#current tab) method, to force refreshing of the window. Now after pressing the button, the contents of the window "jumps" for a second. How to make the process more smooth or how to freeze the screen for the moment of changing the content ?
>>
>>
>>
>> Thanks for suggestion
>>
>> Krystian
>
> Hi Camille,
>
> Thank you for answer, but unfortunately, things go from bad to worse.
> I put the code in expose method :
> IF SELF:oParent:Ini_expose1
>   ret := LockWindowUpdate( SELF:handle() )
>
>   SELF:oParent:Ini_expose1 := FALSE
>   SELF:oParent:Akt_page := #Ko_1
>
>   FOR i := Len(SELF:tab_pol) DOWNTO 1
>    baza := SELF:tab_pol[i, 2]
>    poleform := String2Symbol('oDC'+SELF:tab_pol[i, 1])
>
>    IF SELF:xjaka_akcja = 'P' .OR. SELF:wypelnianie
>     IVarGetSelf(SELF, poleform):value := baza:FIELDGET(SELF:tab_pol[i, 1])
>    ELSE
>     IVarGetSelf(SELF, poleform):value := SELF:tab_pol[i, 3]
>    ENDIF
>   NEXT
>
>   LockWindowUpdate( NULL_PTR )
> ENDIF
>
> The window still blinks and - what is new, i loose colors on the form and the underlaying browser start to blink/jump for a moment.
>
> Thanks for your advice - i get to know a new function/group of functions, but i ask for another suggestion.
>
> Regards
> Krystian
>

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


#6685

FromKrystian Besler <krystian.besler@gmail.com>
Date2014-03-19 07:02 -0700
Message-ID<bd5a9799-0ec8-4ec3-8d1e-12f703a3a3a6@googlegroups.com>
In reply to#6684
On Wednesday, March 19, 2014 1:08:05 PM UTC+1, Camille Kater wrote:
> Hi,
> 
> 
> 
> I would try to avoid the expose() method for these things, as the 
> 
> expose() method gets called several times. Maybe transferring it in a 
> 
> postinit() method could avoid these "blinkings."
> 
> 
> 
> Camille
> 
> 
> 
> 
> 
> On 19/03/2014 10:14, Krystian Besler wrote:
> 
> > On Wednesday, March 19, 2014 12:19:49 AM UTC+1, Krystian Besler wrote:
> 
> >> Hi,
> 
> >>
> 
> >>
> 
> >>
> 
> >> I ask for help.
> 
> >>
> 
> >> I have a data window with some pages of a tab control and some buttons; one of them are the prev and next buttons to navigate up and down through the database.
> 
> >>
> 
> >> In the expose method I put the algorithm of retrieving data, and in prev/next buttons I must use SelectTab(#current tab) method, to force refreshing of the window. Now after pressing the button, the contents of the window "jumps" for a second. How to make the process more smooth or how to freeze the screen for the moment of changing the content ?
> 
> >>
> 
> >>
> 
> >>
> 
> >> Thanks for suggestion
> 
> >>
> 
> >> Krystian
> 
> >
> 
> > Hi Camille,
> 
> >
> 
> > Thank you for answer, but unfortunately, things go from bad to worse.
> 
> > I put the code in expose method :
> 
> > IF SELF:oParent:Ini_expose1
> 
> >   ret := LockWindowUpdate( SELF:handle() )
> 
> >
> 
> >   SELF:oParent:Ini_expose1 := FALSE
> 
> >   SELF:oParent:Akt_page := #Ko_1
> 
> >
> 
> >   FOR i := Len(SELF:tab_pol) DOWNTO 1
> 
> >    baza := SELF:tab_pol[i, 2]
> 
> >    poleform := String2Symbol('oDC'+SELF:tab_pol[i, 1])
> 
> >
> 
> >    IF SELF:xjaka_akcja = 'P' .OR. SELF:wypelnianie
> 
> >     IVarGetSelf(SELF, poleform):value := baza:FIELDGET(SELF:tab_pol[i, 1])
> 
> >    ELSE
> 
> >     IVarGetSelf(SELF, poleform):value := SELF:tab_pol[i, 3]
> 
> >    ENDIF
> 
> >   NEXT
> 
> >
> 
> >   LockWindowUpdate( NULL_PTR )
> 
> > ENDIF
> 
> >
> 
> > The window still blinks and - what is new, i loose colors on the form and the underlaying browser start to blink/jump for a moment.
> 
> >
> 
> > Thanks for your advice - i get to know a new function/group of functions, but i ask for another suggestion.
> 
> >
> 
> > Regards
> 
> > Krystian
> 
> >

Hi Camille,

PostInit is called only once on the beginning and in expose I put a flag "ini_expose" to prevent multiplication the same operations. When user presses the next button I do not close the window only change the data on the form.
I will see; it is irritating for me; maybe not for users.

Thank you
Krystian

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


#6686

From"Jamal" <someone@example.com>
Date2014-03-19 11:44 -0400
Message-ID<lgce0v$fov$1@speranza.aioe.org>
In reply to#6681
Here is a sample of what you need to handle Previous record button.

METHOD PrevRecButton( ) CLASS MyWin
IF !SELF:Server:BOF

    IF SELF:Server:RLOCK()
        SELF:Server:Skip(-1)

    //    SELF:ScatterTabPages() // write code to assign values from data 
table to windows controls.

        SELF:Show()   // show the window
     ENDIF
ENDIF

RETURN SELF

You do not need an Expose() or SelectTab().

Jamal

"Krystian Besler"  wrote in message 
news:2860ada9-348c-4a38-97d1-413b2e1cb10e@googlegroups.com...

Hi,

I ask for help.
I have a data window with some pages of a tab control and some buttons; one 
of them are the prev and next buttons to navigate up and down through the 
database.
In the expose method I put the algorithm of retrieving data, and in 
prev/next buttons I must use SelectTab(#current tab) method, to force 
refreshing of the window. Now after pressing the button, the contents of the 
window "jumps" for a second. How to make the process more smooth or how to 
freeze the screen for the moment of changing the content ?

Thanks for suggestion
Krystian 

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


#6687

FromKrystian Besler <krystian.besler@gmail.com>
Date2014-03-19 09:08 -0700
Message-ID<6455650a-6baf-43a7-8e67-3c44547e49ba@googlegroups.com>
In reply to#6686
On Wednesday, March 19, 2014 4:44:33 PM UTC+1, Jamal wrote:
> Here is a sample of what you need to handle Previous record button.
> 
> 
> 
> METHOD PrevRecButton( ) CLASS MyWin
> 
> IF !SELF:Server:BOF
> 
> 
> 
>     IF SELF:Server:RLOCK()
> 
>         SELF:Server:Skip(-1)
> 
> 
> 
>     //    SELF:ScatterTabPages() // write code to assign values from data 
> 
> table to windows controls.
> 
> 
> 
>         SELF:Show()   // show the window
> 
>      ENDIF
> 
> ENDIF
> 
> 
> 
> RETURN SELF
> 
> 
> 
> You do not need an Expose() or SelectTab().
> 
> 
> 
> Jamal
> 
> 
> 
> "Krystian Besler"  wrote in message 
> 
> news:2860ada9-348c-4a38-97d1-413b2e1cb10e@googlegroups.com...
> 
> 
> 
> Hi,
> 
> 
> 
> I ask for help.
> 
> I have a data window with some pages of a tab control and some buttons; one 
> 
> of them are the prev and next buttons to navigate up and down through the 
> 
> database.
> 
> In the expose method I put the algorithm of retrieving data, and in 
> 
> prev/next buttons I must use SelectTab(#current tab) method, to force 
> 
> refreshing of the window. Now after pressing the button, the contents of the 
> 
> window "jumps" for a second. How to make the process more smooth or how to 
> 
> freeze the screen for the moment of changing the content ?
> 
> 
> 
> Thanks for suggestion
> 
> Krystian

Hi Jamal,

It is quite new approach the problem; I need time, to rebuild my app and probably change the way of thinking...

Thank you for this idea
Krystian

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


#6688

FromSteve E <steven_emmett@yahoo.co.uk>
Date2014-03-20 00:19 -0700
Message-ID<3180e2d2-7710-4543-9eb5-8e45bb315c87@googlegroups.com>
In reply to#6687
On Wednesday, March 19, 2014 4:08:24 PM UTC, Krystian Besler wrote:
> On Wednesday, March 19, 2014 4:44:33 PM UTC+1, Jamal wrote:
> 
> > Here is a sample of what you need to handle Previous record button.
> 
> > 
> 
> > 
> 
> > 
> 
> > METHOD PrevRecButton( ) CLASS MyWin
> 
> > 
> 
> > IF !SELF:Server:BOF
> 
> > 
> 
> > 
> 
> > 
> 
> >     IF SELF:Server:RLOCK()
> 
> > 
> 
> >         SELF:Server:Skip(-1)
> 
> > 
> 
> > 
> 
> > 
> 
> >     //    SELF:ScatterTabPages() // write code to assign values from data 
> 
> > 
> 
> > table to windows controls.
> 
> > 
> 
> > 
> 
> > 
> 
> >         SELF:Show()   // show the window
> 
> > 
> 
> >      ENDIF
> 
> > 
> 
> > ENDIF
> 
> > 
> 
> > 
> 
> > 
> 
> > RETURN SELF
> 
> > 
> 
> > 
> 
> > 
> 
> > You do not need an Expose() or SelectTab().
> 
> > 
> 
> > 
> 
> > 
> 
> > Jamal
> 
> > 
> 
> > 
> 
> > 
> 
> > "Krystian Besler"  wrote in message 
> 
> > 
> 
> > news:2860ada9-348c-4a38-97d1-413b2e1cb10e@googlegroups.com...
> 
> > 
> 
> > 
> 
> > 
> 
> > Hi,
> 
> > 
> 
> > 
> 
> > 
> 
> > I ask for help.
> 
> > 
> 
> > I have a data window with some pages of a tab control and some buttons; one 
> 
> > 
> 
> > of them are the prev and next buttons to navigate up and down through the 
> 
> > 
> 
> > database.
> 
> > 
> 
> > In the expose method I put the algorithm of retrieving data, and in 
> 
> > 
> 
> > prev/next buttons I must use SelectTab(#current tab) method, to force 
> 
> > 
> 
> > refreshing of the window. Now after pressing the button, the contents of the 
> 
> > 
> 
> > window "jumps" for a second. How to make the process more smooth or how to 
> 
> > 
> 
> > freeze the screen for the moment of changing the content ?
> 
> > 
> 
> > 
> 
> > 
> 
> > Thanks for suggestion
> 
> > 
> 
> > Krystian
> 
> 
> 
> Hi Jamal,
> 
> 
> 
> It is quite new approach the problem; I need time, to rebuild my app and probably change the way of thinking...
> 
> 
> 
> Thank you for this idea
> 
> Krystian

Hi, you could always use SuspendUpdate() and RestoreUpdate(). These are methods of the Control Class that issue Windows API calls to stop the window constantly being redrawn during expose events, and then re-enabling it. I have used these in several situations and they work for me !!

[toc] | [prev] | [standalone]


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


csiph-web