473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Problem with Toolbar and ImageList

Hi,
I am writing a windows application. To my form I have added a
ToolBar componenet and have created a collection of buttons within it.
I have also created an ImageList, where I have loaded the collection
of images into this component.

In the toolbar component I set the ImageList property with the the one
created. In the collection of buttons of the same toolbar, I start to
index the buttons with images. In the design view the images are
visible on the icons, but when I execute the application, no images
are seen.

Can someone help me out.
Thanks in Advance
Nov 16 '05 #1
2 1422
hi,

weird indeed, it should work fine,
do this, debug the app and see if the ImageList is initialized and if the
images are loaded, the images by defualt are compiled as resources inside
the .exe

this code should be inside InitiateComponent() method.

I cannot think of any other possible cause

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Xarky" <be*********@yahoo.com> wrote in message
news:bc*************************@posting.google.co m...
Hi,
I am writing a windows application. To my form I have added a
ToolBar componenet and have created a collection of buttons within it.
I have also created an ImageList, where I have loaded the collection
of images into this component.

In the toolbar component I set the ImageList property with the the one
created. In the collection of buttons of the same toolbar, I start to
index the buttons with images. In the design view the images are
visible on the icons, but when I execute the application, no images
are seen.

Can someone help me out.
Thanks in Advance

Nov 16 '05 #2
Hi,
I added in the Windows Form Method I added the following,

toolBar1.ImageList = imageList;
toolBarButton1.ImageIndex = 0;
toolBarButton2.ImageIndex = 1;
..etc
toolBar1.Refresh();

and now they can be seen in the executed program.

I checked the "Windows Form Designer Generated Code" and that code
snippet as shown above is there, but it still won't work as supposed.

Its really strange :S

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jim P. | last post by:
I added a ToolBar, and configuredit. Then added an ImageList, and added images needed for the tool bar. But when I go back to the Button collection from the ToolBar, the ImageIndex is empty. How...
3
by: michael haller | last post by:
In my project i have a textfile witch i import in my c# application. The datas in the textfile i show the datas in the textfile in my datagrid..ok that ist not my problem. Now i have a...
2
by: Gary Brown | last post by:
Hi, I cannot get a toolbar less than about 40 pixels high. I want one about 20 pixels high such as used by Visual Studio. How do I do this? This is with MDE 7.1.3088, .NET Framework...
7
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the...
9
by: Hugh | last post by:
after I changed the image size. I tried different combinations of images sizes and button sizes. I have tried both botton and the image in the same sizes or button size was larger than that of...
7
by: Mitchell Vincent | last post by:
I've been trying to get a standard toolbar to play nice with some nice icons that I have. When I put them on a button or anything they look perfect, but through an imagelist and on a toolbar they...
0
by: Athono | last post by:
I am new to Visual Basic. So the differences between C++ and VB are striking to me. But even this seems like too much. Here is what I am talking about: I got a project out of source safe and I...
2
by: Jeannette | last post by:
Hi! I used a toolbar with an imagelist. I can see images on toolbar buttons in design view, but not during runtime. Does anybody know why and what needs to be done? Any help will be greatly...
7
by: raknin | last post by:
Hi I have a carousel script. I want to load the carousel with a new set of pictures every time I press a button. The problem that I have that the script append the new pictures to the olds one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.