Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2170
Hiding Buttons
posted

I am using a WinGridBagLayoutPanel which contains 40 UltraButtons (4 columns and 10 rows). We are allowing the user to design the screen and set the SpanX and SpanY. When this is set is there anyway to automatically hide the buttons that will be covered by the button where the SpanX and SpanY was just set? Maybe an event that fires or something.

Right now I loop through the WinGridBagLayout Controls collection and analyze the OriginX, OriginY, SpanX and SpanY of the button that was just changed. I am hoping there is an easier way.

Any direction would be great.

Parents
  • 2170
    posted

    Just to follow up on the above post. I have run into an issue where when hiding the buttons if all of the buttons on the y axis are hidden due to the buttons above them having a SpanY greater than 1 the entire y axis is removed. This results in the buttons above where the SpanY was GT 1 to appear to be cutoff. Is there a way to prevent this from happening? If I disable the buttons instead of hiding them I do not see the problem but the issue then is the buttons where the Span GT 1 are not see in full size as the disabled buttons bleed through.

Reply Children