listbox

How to open and close another window with scrollbar in tkinter for python 3.5.?

元气小坏坏 提交于 2019-12-11 06:26:23
问题 I want to build a Tkinter app in python 3.5. with a StartPage and a another window PageTwo that includes a table with a scolldownbar . I have tried to apply a framework from an online tutorial and the listbox example from another website. My problem is: when I run the program both pages are loaded directly. How can I manage to let PageTwo only open on click on Button in StartPage , and then apply another button in PageTwo that closed PageTwo again and redirects to StartPage ? Second question:

Exception : The calling thread cannot access this object because a different thread owns it. [duplicate]

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:23:59
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: The calling thread cannot access this object because a different thread owns it I am making a Login Form in My WPF Project (WPF with C#) I have one main form whose name is Window1 . When I start the app a Login Dialog Form is first shown with Username and Password fields. If Username and Password are correct, then show MainWindow1 . My Window1 has one ListBox which is to be filled. When the app succeed in login,

Listbox content not being populated with content from xml when using XmlDataProvider

喜夏-厌秋 提交于 2019-12-11 06:18:15
问题 I have a very simple application resource specified as <Application.Resources> <XmlDataProvider x:Key="MoreColors" XPath="/colors"> <x:XData> <colors> <color name="pink"/> <color name="white"/> <color name="black"/> <color name="cyan"/> <color name="gray"/> <color name="magenta"/> </colors> </x:XData> </XmlDataProvider> </Application.Resources> and then a window trying to populate a listview with elements from the xml as <ListBox x:Name="lbColor" IsSynchronizedWithCurrentItem="True" Width=

LB_SETTABSTOPS does not appear to affect a CheckedListBox

妖精的绣舞 提交于 2019-12-11 06:00:10
问题 I am trying to set tab stops in a CheckedListBox in my WinForms application, but no matter what I do, it does not seem to have any effect. I have the following in the code for my form: <DllImport("user32.dll")> _ Public Sub SendMessage(ByVal hWnd As IntPtr, ByVal uMsg As Int32, ByVal wParam As Int32, ByRef lParam As Int32) End Sub Public Const LB_SETTABSTOPS As Int32 = &H192 And in the form's load method, I am doing the following, where theList is my CheckedListBox: Dim tabStops() As Integer

how to deselect other listBoxes when 1 is selected

心已入冬 提交于 2019-12-11 05:57:38
问题 I have 3 listBoxes and I want to deselect others when 1 of them is selected. How can I do this? I have tried setting the focused property to false, but c# doesn't allow assigning to the focused property. 回答1: Assuming you have three list boxes, do the following. This code will clear the selection of every other list box when a particular list box changes selections. You can clear a list box selection by setting its SelectedIndex = -1 . private void listBox1_SelectedIndexChanged(object sender,

Windows Phone 7: Making ListBox items change dynamically

不想你离开。 提交于 2019-12-11 05:49:00
问题 I am working on creating a Windows Phone app that will play a series of sound clips selected from a list. I am using the MVVM (Model View View-Model) Design pattern and have designed a model for my data, along with a view model for my page. Here is what the XAML for the ListBox looks like: <ListBox x:Name="MediaListBox" Margin="0,0,-12,0" ItemsSource="{Binding Media}" SelectionChanged="MediaListBox_SelectionChanged" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">

Update item in BindableCollection with notify ICollectionView

夙愿已清 提交于 2019-12-11 05:48:45
问题 Hi I bind collection from Caliburn Micro on ListBox control in view. Here is it. public BindableCollection<UserInfo> Friends { get { return _friends; } set { _friends = value; NotifyOfPropertyChange(() => Friends); } } ListBox items is type of UserInfo. Hi I sort and group listbox items, I use CollectioView on this purpose. When I initialize ListBox I sort and group items with this method. private ICollectionView _currentView; //... private void SortContactList() { _currentView =

C#; listbox's as one object(container)

ぃ、小莉子 提交于 2019-12-11 05:45:44
问题 I use Visual studio 2008 I have 5 listbox's on form,I created a new class file -called him "scaner.cs" scaner.cs -he cannot see "listbox". I have create an instance. scaner Comp = new scaner(listBox2, listBox1, listBox3, listBox4, listBox5); In scaner.cs file I use it like this. class scaner { public ListBox ls; public ListBox lsE; public ListBox lsIVars; public ListBox lsNumbers; public ListBox lsStrings; public scaner(ListBox ls, ListBox lsE, ListBox lsIVars, ListBox lsNumbers, ListBox

Custom List Box item style

瘦欲@ 提交于 2019-12-11 05:43:52
问题 I have a style like below: <!-- ListBox ItemTemplate style. --> <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderThickness" Value="0"/> <Setter Property="BorderBrush" Value="Transparent"/> <Setter Property="Padding" Value="0"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Template"> <Setter.Value>

Displaying a data-bound StackPanel inside a DataTemplate

本秂侑毒 提交于 2019-12-11 05:30:36
问题 I have objects I'm databinding to a ListBox in WPF. Here's what the end result should look like: ------------------------------- | Name | Opt1 | Value1 | | | Opt2 | Value2 | | | Opt3 | Value3 | | | Opt4 | Value4 | ------------------------------- Essentially i've got a DataTemplate for the overall variable, and then the Opt/Value combo has it's own DataTemplate. I'm trying to display the list of values as simply as possible. <Label Content="{Binding Path=Identifier.Name, Mode=OneWay}" />