items

I'm trying to remove empty items in listbox in C#

So i want to remove empty items in listbox like whitespace so Far I have this code. But the compiler is giving me an error for (int i = 0; i < listBox2.Items.Count; i++) { if (listBox2.Items[i].ToString = " "){//ERROR* listBox2.Items.RemoveAt(i); } } *Cannot convert method group 'ToString' to non-delegate type 'bool'. ...

Custom TreeView move items and get updated coordinates

Hi all, I am using a Custom TreeView (whit custom item style) bound to an ObservableCollection. I have a function that walks the tree and calculates/stores items' coordinates with the purpose of drawing some custom shapes over the tree. It uses something like this: (...) FrameworkElement grid = VisualTreeHelper.GetChild(currentParent, 0...

Modification of the list items in the loop (python)

I'm trying to modify items in a list using a for loop, but I get an error (see below). Sample code: #!/usr/bin/env python # *-* coding: utf8 *-* data = [] data.append("some") data.append("example") data.append("data") data.append("here") for item in data: data[item] = "everything" Error: Traceback (most recent call last): Fil...

categories and items 1 big array

I've made some search on the forum without any good answers for my problem. If I missed something, feel free to link me to the question! What I need to do is simple: a function that returns an array of the full tree of my categories and items. I only have 1 depth (item and a cat_id), so no recursion involved (though if you have a recurs...

Winforms combobox compare

am using two combobox in my C# .net windows application like combobox1 & combobox2(two combobox contain same items) if am choosing any items in combobox1 i need to hide that value in combobox2. Am having problem in this ...

Copying ComboBox Items to a StringCollection in C#

How can I copy a collection of items in a comboBox to a StringCollection in my C# application? I'm only interested in capturing the string text for each item in their respective order. I am trying to make a MRU file list that is saved between sessions, so I would like to copy comboBox.Items to StringCollection Properties.Settings.Defau...

WPF expander size issue

I am using an items control to place n number of expanders. My items control will be placed in a grid with height 600 (for example). I want to make sure my items control will always ocupy entaire available height, to do so it can expand some of the expanders. What will be the best approch to do so? Any suggestions will be appriciated. ...

JavaScript avatar with items question

I'm trying to create a javascript avatar. E.G with Head Items, body items etc... I have a PHP script that queries the database and retrieves the current items the avatar/user is wearing, it's response is in a serialised array. The item/avatar images are in E.G: http://blahblahblahBlah.com/graphic/itemtype/id.png How would I create an "i...

Determine which Items are new when ProjectsEvents.ItemAdded is fired (VS Extensibility)

In my add-in I build List<> objects of specific file types (which are project items) during the Connect() event. In order to check and possibly append new items as and when these are added I've bound the relevant event: ProjectsEvents.ItemAdded += ProjectsEvents_ItemAdded; But the event only passes the Project which contains the new ...

delphi 7 Items property

I come from Java background, where we have data structures with interfaces that if its collection it support certain behaviour, and a set has another. while programming in Delphi I thed to hit a brick wall when it comes in asking the reflection about the behaviour of items, its very strange. for example this code does not compile ...

Problem: items from array (AlertDialog)

Hi all, Thanks to help people! I use an AlertDialog with list (singlechoice->radioButtons). When I choose an item from the list, a toast come and I do a setText of the item on a textView. Everything works when I declare my items like this: ((ImageButton)findViewById(R.id.pickPays)).setOnClickListener(newOnClickListener(){ p...

Some wpf Font_Combobox questions

Hello folks, I have this code: <ComboBox Width="100" ItemsSource="{Binding FontList}" x:Name="fontComboFast"> <ComboBox.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel /> </ItemsPanelTemplate> ...

Js : Set field items for each items I create

I would like to set manually each items when I create them. I'm a newbie in Js but I search for a long time and no find the answer : I need some help please. When I make a new annonce, how reach each field ? function annonce() { return { // scroll: 'vertical', items: [{ xtype: 'fieldset', title: 'Annonce', ...

How to display real tabular data with WPF?

Hi, i've got following problem: i have to display tabular data in some kind of grid. Say class A is a data item, with properties Foo and Bar, and i have a list of items List or sth like this. i want to display these items in a grid, where items with same Foo are in one column, and items with same Bar in one row. basic. simple. i thoug...

WPF strange context menu behaviour

Hi I create a contextmenu dynamicly using this code protected MenuItem itemAdd, itemDelete, itemSelectBranch, itemDeleteClasp; protected MenuItem itemCut, itemCopy, itemPaste, itemAddParent, itemPasteWithChildren; protected MenuItem itemAddTask, itemAddExtTask, itemAddMileStone; menu = new ContextMenu(); itemAdd = ne...

C#: Real-time combobox updating

Edit: Alright, just one more thing: "It will only update the first character I change. So if I use backspace anywhere, it updates, and then I have to restart before it will update again. Also, it will go to the far left of the combobox line, which can be pretty annoying.. If anyone knows how to fix that too, I'd be really gratefull." I ...

Pass multiple data items from controller to view

Hello there, I am using VS 2010, MVC, VS 2005 I create .dbml file as my model and map tables inside .dbml file i join tables using LINQ to SQL. I want to display record of two tables i.e. tbl_class, tbl_subject COde in my controller looks like this public ActionResult SubjectByTeacher() { var DataContext = new SM...

I have a html list item. When I drag and drop the item to the webpart zone , a image should load .

I have a html list item and image control on the webpart zone . I'm using jquery to drag and drop the item from the list.When I drag and drop the item from the list to the webpart zone , a image should load on the webpart zone. ? Plese let me know how to achive this . ...

Finding length of items from a list

Hi everyone, I have two list in a python list1=['12aa','2a','c2'] list2=['2ac','c2a','1ac'] First- Finding combinations of each two item from list1. Second- Finding combinations of each two item from list2. Third- Finding combinations of each two items from list1 and list2 Fourth- Calculating each combinations total length Advic...

Magento remove bundle item using API

Hi, I am looking for an API that can remove bundle items added in a main bundle product. Can some one guide me to that API? regards, Irfan ...