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