Programming C++Builder Using Panels and Date-time Pickers to Design Useful Windows Interface
Notice: Undefined variable: relatedArticlesCount in /home/wwwroot/ on line 149

How to use Panels in C Builder or Delphi?

The TPanel component provides a generic container for other controls. Panels are typically used to visually group components together on a form. Panels can be aligned with the form to maintain the same relative position when the form is resized. The BorderWidth property determines the width, in pixels, of the border around a panel.

You can also place other controls onto a panel and use the Align property to ensure proper positioning of all the controls in the group on the form. You can make a panel alTop aligned so that its position will remain in place even if the form is resized.

The look of the panel can be changed to a raised or lowered look by using the BevelOuter and BevelInner properties. You can vary the values of these properties to create different visual 3-D effects. Note that if you merely want a raised or lowered bevel, you can use the less resource intensive TBevel control instead.
You can also use one or more panels to build various status bars or information display areas.

Panel is the most frequent component used in designing the user interface in C Builder or Delphi. See here is an very good and tipycal example to design a normal form in an aaplication.

How to use Date-time pickers and month calendars (VCL only)

The DateTimePicker component displays a list box for entering dates or times, while the MonthCalendar component presents a calendar for entering dates or ranges of dates. To use these components, you must have version 4.70 or later of COMCTL32.DLL (usually located in the Windows\System or Windows\System32 directory) at both design time and runtime. They are not available for use in cross-platform applications.

Of course, you can use an TEidt component in alternative. When use a TEdit or other component to capture the user's input text, you must change the text to a TDateTime variable. 

AnsiString szTime = Edit1->Text;
TDateTime dt = TDateTime(szTime); 

Using the following function to convert a TDateTime variable to an AnsiString: 

FormatDateTime("yyyy-mm-dd", DateTimePicker1->Date); 

Add comment

Security code

Programming - C++Builder