Hi Brad, It worked perfectly, thanks for this, Steve

 
Maybe try:

$self->{"Ctl_Appointment_Nbk"}->SetSelection(0);

instead of: 

$self->{Ctl_Appointment_Tab_Appt_1}->SetFocus();

That should set the displayed tab to the first tab.

Hope that works for you!

Brad


2009/8/25 Steve Cookson <[email protected]>


        Hi,

        I have a large notebook, with maybe 100 items on each tab.

        Each tab corresponds to an appointment.  When I switch clients 
        I need to clear down the tab starting with the last.  If the tab
being displayed 
        is the first one there is no problem and the process is lightening
        quick.  If the tab being displayed is the last one, then, as the
        tab is deleted, the next one is displayed, and so on, with a ripple
        effect that takes a few seconds.  So I thought, well, if I force a
display of the 
        first tab and then delete from the end, there might be one refresh
if the first tab 
        is not already being displayed, but no, I get no effect at all.

        What am I doing wrong? (PS Freeze and Thaw don't seem to have any
effect either).

        Here is the code:

                my
$loc_page_count=$self->{"Ctl_Appointment_Nbk"}->GetPageCount();
                my $i;
                $self->{Ctl_Appointment_Tab_Appt_1}->SetFocus();
# Set focus on first tab to avoid rippling effect
                for ($i=$loc_page_count;$i>=1;$i--) {
                    
                #   Remove tab
                
                    $self->{Ctl_Appointment_Nbk}->DeletePage($i-1);
                }

         

        Regards
        
        Steve



  • SetFocus Steve Cookson
    • RE: SetFocus Steve Cookson

Reply via email to