[Cuis-dev] initial size of SystemWindow subclass
Mark Volkmann
r.mark.volkmann at gmail.com
Fri Aug 9 17:19:05 PDT 2024
Thanks for that tip Jon! I made that change, but the issue with sizing the
window to hold its contents still remains. Clicking an edge of the window
fixes it. I'm thinking there must be a method I need to call on the
SystemWindow after adding content to it so it will recalculate its size.
On Fri, Aug 9, 2024 at 1:02 PM Jon Hylands via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:
> In general, when I make an app like that, it holds onto a SystemWindow in
> an instance variable - there's no reason to subclass from that class unless
> you're changing how the parts of a window that it provides work.
>
> - Jon
>
>
> On Thu, 8 Aug 2024 at 20:57, Mark Volkmann via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
>
>> I'm working on a small demo app ... a todo app. Initially the main class
>> was a subclass of LayoutMorph. I changed it to be a subclass of
>> SystemWindow so I would get a title, a close button, and the ability to
>> resize it for free.
>>
>> Is there any reason to avoid creating subclasses of SystemWindow for
>> things that are not development tools? I suppose not.
>>
>> When I first open it, it isn't sized correctly to hold all the contents I
>> add. See the first screenshot. When I click on an edge of the window, it
>> automatically resizes to look like the second screenshot. Is there a
>> message I could send to my subclass that would cause it to size correctly
>> immediately? I did a lot of searching, but couldn't find anything to do
>> that.
>>
>> --
>> R. Mark Volkmann
>> Object Computing, Inc.
>> --
>> Cuis-dev mailing list
>> Cuis-dev at lists.cuis.st
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
--
R. Mark Volkmann
Object Computing, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20240809/7f182b12/attachment.htm>
More information about the Cuis-dev
mailing list