Stephen Bungay ha scritto: > Thanks for the clarification, the resize method is new since I last > did extensive work with GAMBAS, IMHO it is not required. On thye surface > of it setting the Width and Height Properties perform the same function > as the Resize method. > > The timer hack is a major kludge and is not acceptable. > > If one calls the resize method and the form "resizes" then a "resize > event" has occurred and that event should fire. > This point is debatable. My opinion is that event should be raised when things change without program intervention, but it seems that many people don't think so. For example, when I write handlers for checkboxes_click, events are fired when, in code, the value is changed. I write "ckWarn.value=true", and an event fires. This annoys me, because I don't need to be alerted for something I just have done...
> .Parent form resize event occurs due to user interaction > .. Programmer's code adjusts tabstrip size. > .. Programmer calls embedded forms' resize method with new size params > ....Embedded form resizes > ....Embedded forms' resize event fires (it just resized after all!) > ......Resize event can be used by programmer to adjust child controls. > > The resize event of an object should fire when that object is > resized, full stop. Who or what caused the resize to occur is irrelevant. > Step 2: the tabstrip could also adjust itself automatically (expand=true) Step 3: call the embedded form resize method. This implies that the tabstrip knows what it has inside, and how that form would like to resize. This breaks independency. Better would be to send an event to embedded form, and let the form decide what to do... Step 4: (see note before). If the embedded form resizes itself, could be a good idea to automatically raise a resize event. I don't think so - I think a program should have the possibility to send events to other objects. In this situation, I would like: 1. The user resizes the main form, which receives a resize event to operate on if wanted. 2. Children of the main form that are in some way affected (expand=true), receive a resize event (if they have it). 3. The tabstrip resizes, either automatically because expand=true or because parent form intervention, and so its children (tabstrip children) receive a resize event 4. The embedded form receives a resize event, and can ignore it or handle it. It seems that one ore more things are missing in gambas... :-) Salutations, Doriano ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user