Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Начинающим";
Текущий архив: 2018.02.18;
Скачать: [xml.tar.bz2];

Вниз

Как создать класс Таблица?   Найти похожие ветки 

 
gedevan   (2016-02-25 18:36) [0]

Хочу создать класс, соответствующий таблице. В таблице есть колонки. Эти колонки можно добавлять и удалять, т.е. предварительно это вроде как массив с именами колонок.

А как хранить строки? при том, что колонок разное количество? Создавать двухмерный массив? 1 измерение это колонка, 2е строка.

Но что если в разных колонках разные типы данных?

и еще я бы хотел чтобы в строке к имени колонки можно было обращаться через точку.

Т.е. Tab:TMytab;

Tab.strings[0].FirstCol := 3;

можно ли как то такое организовать?


 
Sha ©   (2016-02-25 19:29) [1]

Creating array properties
Some properties lend themselves to being indexed like arrays. For example, the Lines property of TMemo is an indexed list of the strings that make up the text of the memo; you can treat it as an array of strings. Lines provides natural access to a particular element (a string) in a larger set of data (the memo text).

Array properties are declared like other properties, except that

The declaration includes one or more indexes with specified types. The indexes can be of any type.
The read and write parts of the property declaration, if specified, must be methods. They cannot be fields.

The read and write methods for an array property take additional parameters that correspond to the indexes. The parameters must be in the same order and of the same type as the indexes specified in the declaration.

There are a few important differences between array properties and arrays. Unlike the index of an array, the index of an array property does not have to be an integer type. You can index a property on a string, for example. In addition, you can reference only individual elements of an array property, not the entire range of the property.


 
Юрий Зотов ©   (2016-02-25 20:26) [2]

TMemoryDataSet + TDBGrid ?


 
Игорь Шевченко ©   (2016-02-25 21:05) [3]

Excel


 
Германн ©   (2016-02-26 02:18) [4]

TStringGrid ?


 
Kilkennycat ©   (2016-02-26 12:12) [5]

XML



Страницы: 1 вся ветка

Форум: "Начинающим";
Текущий архив: 2018.02.18;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.45 MB
Время: 0.001 c
2-1456269323
aturasama
2016-02-24 02:15
2018.02.18
idHTTPserver


2-1456414598
gedevan
2016-02-25 18:36
2018.02.18
Как создать класс Таблица?


2-1456480306
Dmk
2016-02-26 12:51
2018.02.18
punpcklbw (MMX)


1-1356018654
AxNb
2012-12-20 19:50
2018.02.18
Динамические потоки не обновляют вовремя визуальные данные - XE2


2-1456234119
Vega
2016-02-23 16:28
2018.02.18
Проблемы с WM_SETTEXT





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский