Thanks for replying

Yes I have tried Deferred command but it gives the same effect, or may be I 
use it in a wrong way? I schedule it inside the event handler, is this the 
right place?
disclosurePanel.addOpenHandler(new OpenHandler<DisclosurePanel>() {
        @Override
        public void onOpen(OpenEvent<DisclosurePanel> arg0) {
           scheduleCommand();
        }
      });

private void scheduleCommand() {
    DeferredCommand.addCommand(new Command() {
      public void execute() {
        adjustLayout();   
      }
    });
  }


I checked the issue tracker, and there is an issue planned for the next 
release.
http://code.google.com/p/google-web-toolkit/issues/detail?id=3654&q=disclosurepanel&colspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars
 

Regards
Rasha 
On Wednesday, September 19, 2012 4:09:10 PM UTC+2, Patrick Tucker wrote:
>
> Looks like fireEvents() should be moved to the animation's onComplete().  
> Have you checked the issue tracker for a similar report?  It might be worth 
> filing one if there is not already an issure for this.
>  
> No that this is a good solution, but have you tried using a 
> DeferredCommand?
>
> On Wednesday, September 19, 2012 4:18:30 AM UTC-4, Rasha ElSayed wrote:
>
>> Hi all, 
>>
>> I am using Disclosure panel in my project and on open/close, I do some 
>> layout calculations in which I need the height of the panel.
>>
>> My code is something like this
>>  disclosurePanel.addOpenHandler(new OpenHandler<DisclosurePanel>() {
>>         @Override
>>         public void onOpen(OpenEvent<DisclosurePanel> arg0) {
>>            adjustPageLayout(pageLayout);
>>         }
>>       });
>>
>> The problem is that the open event is fired before the disclosure panel 
>> is actually opened, which means that the height of the panel is still as if 
>> it is closed (Header-only height). This gives me wrong numbers when I 
>> call adjustPageLayout
>>
>> Any idea how to deal with this?
>>
>> Best regards,
>> Rasha 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/-VZ-TGhR-dQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to