Hi All, I have a form with three PageControls on it. The one on the left (pcConversations) is always visible. There is a menu which lets the user check or uncheck whether the other two PageControls are visible. Those two PageControls are called pcActions and pcObjects. pcActions is on the right side of the form, align=alRight, and there is a splitter (spActions) with align=alRight flush on the left side of pcActions. The same structure is used for pcObjects (just to the left of spActions and pcActions) and spObjects (just to the left of pcObjects).
Now I want to write the handlers for the 'checked' property of the two menu items <View | Objects> and <View | Actions>. Here is the first attempt at writing these handlers: procedure TfmConversation.Objects1Click(Sender: TObject); begin Objects1.Checked := not Objects1.Checked; spObjects.Left := pcObjects.Left-7; spActions.Left := pcActions.Left-7; pcObjects.Visible := Objects1.Checked; end; procedure TfmConversation.Actions1Click(Sender: TObject); begin Actions1.Checked := not Actions1.Checked; spActions.Left := pcActions.Left-7; spObjects.Left := pcObjects.Left-7; pcActions.Visible := Actions1.Checked; end; The problem is that the splitters and the PageControls don't stay in the right places. If I make pcActions.visible=false and pcObjects.visible=false (by using the checks in the menu) everything is OK. But then when I bring them back to visible (again by using menu checks), they are in the wrong place. Does anyone know how to handle turning the PageControls and splitters visible and back to invisible without changing the left to right order of the components on the form? Thanks for any comments, Rich __________________________________________________ Delphi-Talk mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi-talk
