[squeak-dev] A question on non-openInWorld-able morphs
karl ramberg
karlramberg at gmail.com
Sat Feb 25 10:15:06 UTC 2023
On Sat, Feb 25, 2023 at 8:21 AM Eduardo Ochs <eduardoochs at gmail.com> wrote:
> Hi list,
>
> I need to ask for more pointers... =(
>
> Now I know how to debug what happens when I send certain keys to
> certains morphs. My code is here - not on the wiki yet, sorry -
>
> http://anggtwu.net/eev-squeak.html#key-events
>
> and I am using that to learn how lots of things work. But the morphs
> seem to fall in several different families, each one with a different
> way of initializing... for morphs like these ones I can just use
> openInWorld,
>
> sm := SimpleSwitchMorph new.
> sm openInWorld.
> bm := SimpleButtonMorph new.
> bm openInWorld.
> bm position: bm position + (0 at 32).
> rm := RectangleMorph new.
> rm openInWorld.
> rm position: rm position + (0 at 64).
>
> but for SelectorBrowser I need to use "prototypicalToolWindow" instead
> of new, and there are other ones, like SearchBar, that I don't know
> how to create a new morph of that kind...
>
> Where can I learn more about that? And where do people usually learn
> how to create interfaces in which a single window displays several
> subwindows and subwidgets? In Tcl/Tk this is considered basic... here
> is an example of this "this": the code below
>
Here is an example of a simple interface
TestLayoutMorph new openInWorld
Best,
Karl
>
> frame .top
> frame .bottom
> text .textbox -width 10 -height 5
> listbox .listbox -width 10 -height 5
> button .button1 -text B1
> button .button2 -text B2
> button .button3 -text B3
> .textbox insert end "Foo\nBar"
> .listbox insert end "Item 1"
> .listbox insert end "Item 2"
> .listbox insert end "Item 3"
> pack .top -side top
> pack .bottom -side bottom -fill x -expand 1
> pack .listbox -side left -in .top
> pack .textbox -side right -in .top
> pack .button1 -side left -in .bottom -fill x -expand 1
> pack .button2 -side left -in .bottom -fill x -expand 1
> pack .button3 -side left -in .bottom -fill x -expand 1
>
> creates the window in this screenshot:
>
> https://i.ibb.co/ZcZGRjW/sshot.png
>
> Thanks in advance! =)
> Eduardo Ochs
> http://anggtwu.net/eev-squeak.html
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230225/942f9e04/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestLayoutMorph.st
Type: application/octet-stream
Size: 1039 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230225/942f9e04/attachment.obj>
More information about the Squeak-dev
mailing list
|