Cообщество разработчиков на платформе Microsoft > Форумы > Visual Basic General > Tabcontrol (imageindex etc), how to set the image to the right of the text?
Задайте вопросЗадайте вопрос
 

ОтвеченоTabcontrol (imageindex etc), how to set the image to the right of the text?

Ответы

  • 10 мая 2007 г. 3:36Bruno YuMSFT, МодераторМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено

    Andeplane,

     

    I hope the following thread can help you with the problem:

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=570056&SiteId=1

     

    The first thing to do is to set the TabControls DrawMode to OwnerDrawFixed as shown above.

     

    You will of course also need to assign the DrawItem event to the tabControl1_DrawItem() method. Click the lightning bolt in the properties window and after selecting the tabcontrol, click on the dropdown arrow of the DrawItem event so that you can make the association.

     

    This will only color the tabs. The problem you have is that you want a specific appearance for tabs, and that is a lot of work.

     

    Setting the TabControl to OwnerDraw will only allow you to custom Draw the Tab Content. The outline of the tabs will still be drawn by the control.

     

    From what I understand, you wish to use bitmaps to draw the tabs. To achieve this you will need to use the second example on my site as a base, but there will still be a fair amount of work to do afterwards.

     

Все ответы

  • 10 мая 2007 г. 3:36Bruno YuMSFT, МодераторМедали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     Отвечено

    Andeplane,

     

    I hope the following thread can help you with the problem:

     

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=570056&SiteId=1

     

    The first thing to do is to set the TabControls DrawMode to OwnerDrawFixed as shown above.

     

    You will of course also need to assign the DrawItem event to the tabControl1_DrawItem() method. Click the lightning bolt in the properties window and after selecting the tabcontrol, click on the dropdown arrow of the DrawItem event so that you can make the association.

     

    This will only color the tabs. The problem you have is that you want a specific appearance for tabs, and that is a lot of work.

     

    Setting the TabControl to OwnerDraw will only allow you to custom Draw the Tab Content. The outline of the tabs will still be drawn by the control.

     

    From what I understand, you wish to use bitmaps to draw the tabs. To achieve this you will need to use the second example on my site as a base, but there will still be a fair amount of work to do afterwards.

     

  • 5 декабря 2007 г. 9:18jayanthan.s Медали пользователяМедали пользователяМедали пользователяМедали пользователяМедали пользователя
     


    how do i load an image inside a tabitem of tabcontrol???? my tabitem has a grid and i replaced it with viewbox and tried to add an image but i could not able to include,could any one help me out of this issue!!!thanks in advance.