Модераторы: Partizan, gambit
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Как сделать Glyph? 
:(
    Опции темы
Dimyan
Дата 30.1.2004, 07:59 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 441
Регистрация: 12.1.2004
Где: Новосибирск

Репутация: 3
Всего: 4



В BCB есть такое свойство у TSpeedButton, glyph.
Есть ли что то подобное у Button в C# и если да то как это реализовать?


--------------------
Как хорошо ничего не делать, а потом еще немного отдохнуть :)
PM MAIL ICQ   Вверх
AntonSaburov
Дата 30.1.2004, 17:58 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Штурман
****


Профиль
Группа: Модератор
Сообщений: 5658
Регистрация: 2.7.2002
Где: Санкт-Петербург

Репутация: 6
Всего: 118



Если ты о рельефном тексте, то нет, такого нет. Надо все делать ручками. Или поискать готовые компоненты. Во всяком случае такого в стандартных копонентах не встречал.
PM MAIL WWW ICQ   Вверх
Dimyan
Дата 31.1.2004, 08:22 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 441
Регистрация: 12.1.2004
Где: Новосибирск

Репутация: 3
Всего: 4



Нет это вообще не текст!!!
Вот так наверно буде подробние:
Из справки BCB:
TSpeedButton is a button that is used to execute commands or set modes.

Unit

buttons

Description

Use TSpeedButton to add a button to a group of buttons in a form. TSpeedButton introduces properties that can be used to set graphical images that represent the different button states (selected, unselected, disabled and so on). Use other properties to specify multiple images or to rearrange the images and text on the button. TSpeedButton also introduces properties that allow speed buttons to work together as a group. Speed buttons are commonly grouped in panels to create specialized tool bars and tool palettes.

Note: To create a speed button with a client-aligned glyph that covers the button's edges, add a 1-pixel margin around the button's top and left edges and a 3-pixel margin around its bottom and right edges. Do this by manually editing the bitmap specified by the Glyph property.
*************************************

TSpeedButton::Glyph

Specifies the bitmap that appears on the speed button.

__property Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph};

Description

Set Glyph to a bitmap object that contains the image that should appear on the face of the button. Bring up the Open dialog box from the Object Inspector to choose a bitmap file (with a .BMP extension), or specify a bitmap file at runtime.

Glyph can provide up to four images within a single bitmap. All images must be the same size and next to each other in a horizontal row. TSpeedButton displays one of these images depending on the state of the button.

Image position Button state Description

First Up This image appears when the button is unselected. If no other images exist in the bitmap, this image is used for all states.
Second Disabled This image usually appears dimmed to indicate that the button can't be selected.
Third Clicked This image appears when the button is clicked. If GroupIndex is 0, the Up image reappears when the user releases the mouse button.
Fourth Down This image appears when the button stays down indicating that it remains selected.

If only one image is present, TSpeedButton attempts to represent the other states by altering the image slightly for each state, although the Down state is always the same as the Up state.

If the bitmap contains multiple images, specify the number of images in the bitmap with the NumGlyphs property.

Note: The lower left pixel of the bitmap is reserved for the “transparent” color. Any pixel in the bitmap that matches the lower left pixel will be
transparent.


--------------------
Как хорошо ничего не делать, а потом еще немного отдохнуть :)
PM MAIL ICQ   Вверх
stab
Дата 31.1.2004, 12:28 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
***


Профиль
Группа: Экс. модератор
Сообщений: 1839
Регистрация: 1.1.2003

Репутация: 22
Всего: 48



У Button есть свойства Image и ImageAlign, используй их.


--------------------
6, 6, 6 - the number of the beast.
PM MAIL WWW   Вверх
stab
Дата 31.1.2004, 12:29 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Эксперт
***


Профиль
Группа: Экс. модератор
Сообщений: 1839
Регистрация: 1.1.2003

Репутация: 22
Всего: 48



Еще можно через ImageList, ImageIndex, если требуется удобная смена картинок.


--------------------
6, 6, 6 - the number of the beast.
PM MAIL WWW   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Прежде чем создать тему, посмотрите сюда:
mr.DUDA
THandle

Используйте теги [code=csharp][/code] для подсветки кода. Используйтe чекбокс "транслит" если у Вас нет русских шрифтов.
Что делать если Вам помогли, но отблагодарить помощника плюсом в репутацию Вы не можете(не хватает сообщений)? Пишите сюда, или отправляйте репорт. Поставим :)
Так же не забывайте отмечать свой вопрос решенным, если он таковым является :)


Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, mr.DUDA, THandle.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | Общие вопросы по .NET и C# | Следующая тема »


 




[ Время генерации скрипта: 0.0417 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.