C# Класс Habanero.UI.Base.FlowLayoutManager

Manages the layout of controls in a user interface by adding components in the manner of a horizontal text line that wraps to the next line.
Наследование: LayoutManager
Показать файл Открыть проект

Открытые методы

Метод Описание
AddControl ( IChilliControl ctl ) : IChilliControl

Adds a control to the layout

AddGlue ( ) : void

Adds glue that connects two controls together. For example, if you've just added a label and want to ensure the textbox you're adding next is always next to the label, add glue between adding the label and adding the textbox. In this way, if you resize the control such that the textbox doesn't fit on the line, both the label and the textbox will move to the next line together. This must be called immediatly after adding the label. The next control to be added will be the control the label is glued to.

FlowLayoutManager ( IChilliControl managedControl ) : System

Constructor to initialise a new manager

NewLine ( ) : void

Inserts a new line. This is like a line break or carraige return for controls. The next control will start at the control's margin (depending on alignment).

Защищенные методы

Метод Описание
RefreshControlPositions ( ) : void

Updates the layout and appearance of the managed controls

Приватные методы

Метод Описание
BothControlsFitOnALine ( int i ) : bool
CalculateControlPosition ( IChilliControl ctl ) : void

Calculates the control's position in the user interface

ControlDoesNotFitOnCurrentRow ( IChilliControl ctl ) : bool

Informs if the specified control fails to fit on the current row of controls

ControlResizedHandler ( Object sender, EventArgs e ) : void

A handler called when a control has been resized

ControlVisibleChangedHandler ( Object sender, EventArgs e ) : void

A handler called when a control has had its visibility altered

GetControl ( int position ) : IChilliControl
GetPreviousControl ( int currentPos ) : IChilliControl
InitialiseNewRow ( int i, int &rowStart, IList controlsInRow ) : int
IsGluedToAnotherControl ( int pos ) : bool

Checks for glue at a position (a position being a point between two controls. See AddGlue

MoveCurrentPosToStartOfNextRow ( int currentRowHeight ) : void

Moves the current placement position to the beginning of the next row of items

PreviousControlVisible ( int i ) : bool
ResetCurrentPosToTopLeft ( ) : void
SetUpTabIndexForAlignmentRight ( int rowStart, IList controlsInRow ) : void
ShiftControlsRightForCentering ( int startControlNum, int endControlNum ) : void

Shift controls right when centred is alignment is used

TopLeftPosition ( ) : Point

Описание методов

AddControl() публичный Метод

Adds a control to the layout
public AddControl ( IChilliControl ctl ) : IChilliControl
ctl IChilliControl The control to add
Результат IChilliControl

AddGlue() публичный Метод

Adds glue that connects two controls together. For example, if you've just added a label and want to ensure the textbox you're adding next is always next to the label, add glue between adding the label and adding the textbox. In this way, if you resize the control such that the textbox doesn't fit on the line, both the label and the textbox will move to the next line together. This must be called immediatly after adding the label. The next control to be added will be the control the label is glued to.
public AddGlue ( ) : void
Результат void

FlowLayoutManager() публичный Метод

Constructor to initialise a new manager
public FlowLayoutManager ( IChilliControl managedControl ) : System
managedControl IChilliControl The control to manage e.g. a Panel
Результат System

NewLine() публичный Метод

Inserts a new line. This is like a line break or carraige return for controls. The next control will start at the control's margin (depending on alignment).
public NewLine ( ) : void
Результат void

RefreshControlPositions() защищенный Метод

Updates the layout and appearance of the managed controls
protected RefreshControlPositions ( ) : void
Результат void