Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Well, I did find a work around, by not issuing the Resize code if it was the first resize, this seems to have sorted it, but it still doesn't make sense, why would a grid Resize before Initialising?
Kev
>I didn't mean it wouldn't. I meant you would recall init code.
>Cetin
>
>>Cetin
>>
>>Doesn't work I'm afraid, the Resize runs immediately after the form.Load()!
>>
>>Kev
>>
>>>>Hi
>>>>
>>>>In my application on one of the forms, I have a button that opens another form containing just a grid and no RecordSource.
>>>>
>>>>When the form loads the grid has columns twice the width as when I set them, the grid is based on a class I created and there is code in the Resize() event that handles the column sizes.
>>>>
>>>>Whilst debugging the Form, it went from the Load() event into the Grid.Resize() event and then executed my class code BUT it isn't my grid, the name is the same but the width wasn't correct, and it didn't have any properties set!!!! After the Resize() event has finished (and screwed all of the column sizes!) it then goes straight into Resize() again but in MY grid with the correct width etc., BUT when all this is over, the grid that displays is the grid in the first Resize() execution and the sizes completely wrong
>>>>
>>>>What's going here? I've tried everything and it's driving me crazy!
>>>>
>>>>Sorry about the continuous waffle!
>>>>
>>>>Cheers
>>>>Kev
>>>
>>>Kevin,
>>>Based on your grid class a simple solution might be to call :
>>>this.myGrid.Init
>>>in form.init
>>>Cetin
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement