Comments (3)
example2
"
self example2.
" | f g |
g := LayoutMorph initializedInstance openInWorld.
g padding: 0.5. "center"
f := RectangleLikeMorph new.
g morphExtent:400@400; color: Color orange.
g addMorph: f layoutSpec: (LayoutSpec proportionalWidth: 0.25 proportionalHeight: 0.25).
f morphPosition:150@150; color: Color blue.
g morphPosition:70@70.
from cuis-smalltalk-dev.
More notes:
H. Hirzel
[email protected] Fri, May 15, 2015 at 8:05 AM
To: Juan Vuletich [email protected]
Cc: Discussion of Cuis Smalltalk [email protected]
I tested all examples in
https://github.com/hhzl/Cuis-Add-Ons/blob/master/Add-Ons-LayoutDemo.pck.st
in the recent Cuis4.2-2243.image
and all work as they did a year ago
For example we have LayoutDemo0 which shows how to subclass
SystemWindow and set the window title.
-
Subclass SystemWindow
-
Create initialize method
initialize
super initialize. self buildMorphicWindow.
-
Define your #buildMorphicWindow method
buildMorphicWindow self setLabel: self className
A simplified variant of LayoutDemo1b is to have step number 3 do the following:
-
Define your #buildMorphicWindow method
buildMorphicWindow self setLabel: self className. self layoutMorph addMorph: (DragAndDropAreaMorph new color: Color green).
This gives you a Window in which you can drop other morphs. A nice way
to keep Morph examples around.
So or with a code snippet from an earlier mail in this thread.
buildMorphicWindow
| f g |
self setLabel: self className.
g _ RectangleLikeMorph new.
f _ EllipseMorph new.
g morphExtent: 400@400; color: Color orange.
g addMorph: f.
f morphPosition: 50@50; color: Color blue.
g morphPosition:70@70.
self layoutMorph addMorph: g
from cuis-smalltalk-dev.
@KenDickey : Thank you for
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev/blob/master/Documentation/LayoutUsage.md
from cuis-smalltalk-dev.
Related Issues (20)
- #asciiValue doesn't work for $(20) and $(09) HOT 2
- Browser close on: Sample04Pacman new openInHand HOT 4
- Command line launch warning on macOS Ventura 13.0.1 : NSButton height 32.0 instead of max 30 HOT 1
- MessageNotUnderstood: ObjectExplorer>>autoSelectString HOT 1
- Moving the progress bar as updates load is laggy and creates temporary duplicate artifacts of the bar
- Taskbar is not topmost
- WebClient doesn't handle Unicode URLs HOT 5
- Copy to Clipboard non working
- Create missing method from Debugger HOT 2
- NonBooleanReceiver on "browse protocol" HOT 2
- Key not found error: ProtocolBrowserWindow>>browseVersions HOT 1
- Preference "Size of GUI elements" is not persisted after image saving HOT 3
- Inconsistent Dark Theme window color of Process Browser and Preferences HOT 1
- FileManTest>>testDefaultDirectory fails if the image isn't in the current directory HOT 1
- SVG requires Color-Extras which seems absent in Cuis6-2 HOT 1
- drgeo tag 23.12a-beta BrowserWindow doesNotUnderstand openBrowser problem HOT 1
- Request for V3 image support HOT 1
- Installing ^[Erudite] requires base system updates to #6247 but this system is updated to #6161 HOT 2
- DrGeo runs on Cuis 6.3 HOT 4
- Need build instructions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuis-smalltalk-dev.