Was ist das Objekt von der Klasse Rechteck (Informatik)?
Was ist das Objekt bei der Klasse Rechteck?
Fällt mir nichts ein was das sein könnte.
und
Ist der Rest in der Tabelle richtig also die Methoden ?
Danke
3 Antworten
Naja, ein Objekt zur Darstellung eine Rechtecks im grafischen Sinne würde eben die Daten eines Rechtecks enthalten. Das Objekt wäre ein konkretes Rechteck, z.B. ein grünes mit Kantenlänge 4,5cm.
Ich würde einfach "ein konkretes Rechteck, z.B. der Rahmen dieser Zelle" schreiben.
Sieht soweit richtig aus, auch wenn du hier natürlich auch mehrere Attribute und -Werte anführen könntest.
Als Rechteck kannst du beispielsweise "Button" wählen.
Nein, ein Button wird immer mehr als nur ein Rechteck sein. Ein Rechteck ist höchstens ein Attributwert des Attributes "Form" eines Buttons.
nein... ein Rechteck ist einfach ein Objekt mit den Propertys: X,Y,Width.Height .
zB.:
myRect1.X = 10;
myRect1.Y = 100;
myRect1.Width = 150;
myRect1.Height = 100;
Ein Button-Objekt hat unter System.Windows.Forms.Button folgende Propertys (ohne Subpropertys)
zB.
AutoSizeMode : GrowOnly
DialogResult : None
AutoEllipsis : False
AutoSize : False
BackColor : Color [Control]
FlatStyle : Standard
FlatAppearance : System.Windows.Forms.FlatButtonAppearance
Image :
ImageAlign : MiddleCenter
ImageIndex : -1
ImageKey :
ImageList :
ImeMode : Disable
Text :
TextAlign : MiddleCenter
TextImageRelation : Overlay
UseMnemonic : True
UseCompatibleTextRendering : True
UseVisualStyleBackColor : True
AccessibilityObject : ControlAccessibleObject: Owner = System.Windows.Forms.Button, Text:
AccessibleDefaultActionDescription :
AccessibleDescription :
AccessibleName :
AccessibleRole : Default
AllowDrop : False
Anchor : Top, Left
AutoScrollOffset : {X=0,Y=0}
LayoutEngine : System.Windows.Forms.Layout.DefaultLayout
BackgroundImage :
BackgroundImageLayout : Tile
BindingContext :
Bottom : 23
Bounds : {X=0,Y=0,Width=75,Height=23}
CanFocus : False
CanSelect : True
Capture : False
CausesValidation : True
ClientRectangle : {X=0,Y=0,Width=75,Height=23}
ClientSize : {Width=75, Height=23}
CompanyName : Microsoft Corporation
ContainsFocus : False
ContextMenu :
ContextMenuStrip :
Controls : {}
Created : True
Cursor : [Cursor: Default]
DataBindings : {}
DeviceDpi : 96
DisplayRectangle : {X=0,Y=0,Width=75,Height=23}
IsDisposed : False
Disposing : False
Dock : None
Enabled : True
Focused : False
Font : [Font: Name=Microsoft Sans Serif, Size=8,25, Units=3, GdiCharSet=0, GdiVerticalFont=False]
ForeColor : Color [ControlText]
Handle : 27461364
HasChildren : False
Height : 23
IsHandleCreated : True
InvokeRequired : False
IsAccessible : False
IsMirrored : False
Left : 0
Location : {X=0,Y=0}
Margin : {Left=3,Top=3,Right=3,Bottom=3}
MaximumSize : {Width=0, Height=0}
MinimumSize : {Width=0, Height=0}
Name :
Parent :
ProductName : Microsoft® .NET Framework
ProductVersion : 4.8.4550.0
RecreatingHandle : False
Region :
Right : 75
RightToLeft : No
Site :
Size : {Width=75, Height=23}
TabIndex : 0
TabStop : True
Tag :
Top : 0
TopLevelControl :
UseWaitCursor : False
Visible : True
Width : 75
WindowTarget : System.Windows.Forms.Control+ControlNativeWindow
PreferredSize : {Width=75, Height=23}
Padding : {Left=0,Top=0,Right=0,Bottom=0}
Fortsetzung:
um Dir mal die komplette datenseitige Definition eines Buttonobjekts anzucauen benutze folgendes kleine Powershellscript.
ButtonCLIXML.ps1
Add-Type -a System.Windows.Forms
New-Object System.Windows.Forms.Button|Export-Clixml -Path 'Button.xml'
Start-Process 'Button.xml'
Buttonobjekt inklusive Methoden:
Objekt von Rechteck könnte Viereck sein, oder "geometrische Figur".
Ein Button ist mehr als nur ein Rechteck.