[Gambas-user] Sidepanel Problem

Laxminarayan G Kamath A laxminarayan at ...1434...
Sat May 6 09:23:22 CEST 2006


Hi,
   I am using Gambas ver 1.9.21 . I am using the sidepanel widget. I 
have noticed 2 problems:

1) when the panel hides, the event "hide" is triggered after it hides, 
and the event "show" is triggered before the panel is shown. So the 
problem is, in the "show" event, I do not get the width of the sidepanel 
properly. And as a result,  If I try to use the event to resize some 
other widget, the other widget remains maximised even after the panel is 
show.
  
2) The widget allows to resize freely, but there is no "resize" event. I 
think it is best keep only the "resize" event. If poeple want to know if 
the panel is hidden or shown, they can always use the "hidden" property 
to know .

In a general sense, I feel all event driven programming languages should 
implement event callbacks like this -
one before the event and one after. So there is no ambiguity in when the 
event trigger is called. Not only that , but the programmer may require 
to some times use one and otherwise error.
 
The event callback that happens before the event is carried out must 
allow to return true or false, thus enabling to "discard" the event. 
Javascript style :-)

Eg: I have a filelist inside the side panel, and a control outside. If 
the use hides the panel, I can return true or false depending on whether 
at least one file is selected in the filelist.

-- 
Laxminarayan G Kamath A
laxminarayan at ...1434...





More information about the User mailing list