Hello, I am trying to add a feature to a lab I am working on where I have to have a way to show images of the 20 pen widths the Easy Paint Lab can do. I am trying to use a ComboBox from Qt in order to do that. This is what I have so far, I cannot see the ComboBox anywhere in my program. #include "toolbar.h" #include "colorchooser.h" #include "../datasingleton.h" #include <QtGui/QToolButton> #include <QtGui/QGridLayout> #include <QtGui/QSpinBox> #include <QtGui/QAction> #include <QtCore/QMap> #include <QComboBox> #include <QIcon> ToolBar::ToolBar(const QMap<InstrumentsEnum, QAction *> &actMap, QWidget *parent) : QToolBar(tr("Instruments"), parent), mActMap(actMap) { setMovable(false); initializeItems(); …

Member Avatar
Member Avatar
+0 forum 1

Hi Group, I'm attempting to pull info from our database to populate a combo-box in VB.net (Visual Studio Express 2015). Here's my first attempt at the connection: Dim conn As New Oracle.DataAccess.Client.OracleConnection() conn.ConnectionString = oraDB From here I'm not sure how to pull the data into the combobox. I do have my code written to find the information: Dim sql As String = "select dw01.RP_ID" _ & "from donacwil.RATE_PLANS_SSB dw01" _ & "where dw01.PROP_ID in ('" & propID & "')" _ & "And dw01.DW_RCRD_STS_CD in ('A')" _ & "Order by dw01.RP_ID" Does anyone know what to do from here? Thanks …

Member Avatar
Member Avatar
+0 forum 4

Hello. I'm new to programming and I'm using vb.net 2010 and I'm stuck with this problem. So here are the details, I have 2 tables in my database, a product table and a category table. In my product table I have product no, product description and category no. In the category table i have category no and category desciption. So this is where Ive been stuck for the entire day, I want my combox(product) to populate based on what is in the combobox(category). For example I have "Chair" in my combobox(category), then what would appear in the combobox(product) would be …

Member Avatar
Member Avatar
+0 forum 3

Hi, I'm trying to create cascading comboboxes, and my code isn't working. I've looked at other threads and I don't know why it isn't working properly. The first combo box displays System Names and the second combobox should populate the all Locations of that specific system chosen. When I run my application, the first combobox populates without any duplicates just as it shoud but when I select a System Name from it, the location combo box populates just one entry and doesn't allow a drop down of all the other location names. Here's my code: [CODE] '---Form_Load Dim con As …

Member Avatar
Member Avatar
+0 forum 3

Dear all I have combox accumated with 3 perameter Grid Connected PV-SYS- Full Feed In Grid Connected PV-SYS with Electrical Appliance -Net Metering Grid Connected PV-SYS with Electrical appliance ,battery system -Net Metering Each combobox value contain images.I used picture box to dispaly images. How to display the image based on Selction of sting from Combobox I have attached image for reference Public Class Climate_Form Private Sub Climate_Form_Load(sender As Object, e As EventArgs) Handles MyBase.Load Dim selectedItem As String selectedItem = ComboBox_TypeOfSys.SelectedItem() If selectedItem = "Grid Connected PV-SYS- Full Feed In" Then PictureBox_FullFeed.Show() PictureBox_NetMeter.Hide() End If If selectedItem = "Grid …

Member Avatar
Member Avatar
+0 forum 1

Hi, Im trying to use a multi column combobox from this thread [Here](http://www.codeproject.com/Articles/8619/Flat-MultiColumn-Combobox-with-Autocomplete) Just wondering if there's a way to show Column header from its datasource (sql) Can't find a property to do this Thanks

Member Avatar
Member Avatar
+0 forum 4

An example how to use Tkinter's OptionMenu() as a combobox to allow one year to be selected from an option list of let's say the past 15 years.

Member Avatar
+2 forum 0

I have the following code in my web page <div class="RegFieldsCountry"> <ajaxToolkit:ComboBox ID="Country" runat="server" CssClass="RegComboEntry" TabIndex="8" Width="180" ValidationGroup="SetUserValGroup" AppendDataBoundItems="true" DropDownStyle="DropDown" ToolTip="Country Selection" BackColor="#C0C0C0" ValidateRequestMode="Enabled" EnableViewState="true" ListItemHoverCssClass="CountryHoverListItem"/> <asp:RequiredFieldValidator ID="RequiredRegComboValidator" runat="server" ControlToValidate="Country" ErrorMessage="Η επιλογή χώρας επιβάλλεται." ToolTip="Η επιλογή χώρας επιβάλλεται." ForeColor="red" ValidationGroup="SetUserValGroup" CssClass="RequiredValidator"/> </div> What I get from that is a ComboBox in the exact place on page inside of a Fildset, and a Drop Down List far away in right - down of the page outside of the Fieldset. What I need is to have the Drop Down List just below of the control. Is there someone to assist me on …

Member Avatar
Member Avatar
+0 forum 1

Hi. I have a Windows form and when it loads focus should be on a combo box. This works correctly but the visual indicator (dotted rectangle) does not appear on the combo box though it has focus. I can confirm that the focus is there as I am able to select using the arrow keys. I have tried using combobx.Focus() and combobx.Select() but none of them worked. Can someone please help and advise. Thanks

Member Avatar
Member Avatar
+0 forum 2

I want to add one of the column in a database table as components in a combobox. How to do it? I am using visual studio 2012 and c#. Help me please. Thank you in advance.

Member Avatar
Member Avatar
+0 forum 3

Hello Everyone, Okay I have got probably one of the weirdest question you have seen in awhile. I have been working on a custom image selection form (much like a file selection, but I didn't like the default Microsoft one). This also includes me rebuilding a custom object, that references, has multiple lists, other custom object, ext, ext. Right now I have problem with it blow out of range exceptions. But here's where it gets weird ... it shouldn't be. Yeah I know, you think I am wrong. But when it blows the error I check all the code's values, …

Member Avatar
Member Avatar
+0 forum 1

Hi i have 2 tables customer (cabinet_num which is integer) and cabinet (cabinet_num Autoincrement and cabinet_title) in my java i can display cabinet title to let the user choose a cabinet..but i want to collect the cainet_number in my customer table customet.cabinet package cabinet; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.JTextField; import javax.swing.SwingConstants; import java.awt.Font; import java.awt.Color; import javax.swing.UIManager; import javax.swing.JLabel; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; import java.awt.ScrollPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; import java.awt.ComponentOrientation; import javax.swing.ScrollPaneConstants; import java.awt.Dimension; import java.awt.event.ActionListener; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.JOptionPane; import javax.swing.JScrollBar; import javax.swing.JComboBox; …

Member Avatar
Member Avatar
+0 forum 6

**I have a table with 4 columns = a(ID),b,c and d.By using LINQ, how can I calculate 'd'* 'b' / 'c' while changing 'a' with a combobox?And would it make any difference if it is a VIEW? is it a fair question? and do you need more information? **

Member Avatar
Member Avatar
+0 forum 1

tables: T_THERA - is a transaction table Columns: ID - STRING MR - STRING ITEMCODE - STRING QTY - INT SIGNA - TEXT M_ITEMS - Masterfile of items Columns: ITEMCODE - STRING DESCRIPTION - STRING M_SIGNA - Masterfile of Signa Columns: SIGNACODE - String DESCRIPTION - String I have a DGV1 with retrieved data... sql of DGV1 is something like "SELECT T.ID, M.DESCRPTION, T.QTY, T.SIGNA FROM T_THERA T, M_ITEM M WHERE T.ITEMCODE = M.ITEMCODE AND T.MR = '"& AS_MR &"'" I need to change the SIGNA column to a combobox. BUT the data in the combobox is a masterfile from …

Member Avatar
Member Avatar
+0 forum 1

hi all; again i have a little bit wired problem here what i'm trying to achive here is that i would like to to a search query to search an employee and after that change the depatment and after that update the data into access database and as you can see in the below pic i'm using the search query in the text changed event in the text box to search for the employee after after that i'm using te following code to refile the combobox AValue, string Adisplay) { string Value = AValue; string display = Adisplay; using (var …

Member Avatar
Member Avatar
+0 forum 5

I am currently confused and not sure why. I believe I have stared at this for to long. I am currently just trying to populate a ComboBox with the data that is read in from a SQL DB through a SQL query. Currently I have the below code. I am confused as to why I would get the error, " conversion from string "cname" to type 'Integer' is not valid. Private Sub QuoteInfo_Load(sender As Object, e As EventArgs) Handles MyBase.Load 'Loads the Existing customers names in the Customer Dropdown Mysqlconn = New SqlConnection Mysqlconn.ConnectionString = "Server=RTIRAKLAP\SQLEXPRESS;database=GriseDB;Trusted_Connection=yes;" Dim READER As SqlDataReader …

Member Avatar
Member Avatar
+0 forum 3

I've created a Mortgage Calculator via WPF on visual studio 2012. The design looks like this: Enter Loan amount: TextBox here Enter Loan Duration: 15 years(Radio Button) 30 years(Radio Button) Other(Radio Button) with TextBox Select Interest Rate: ComboBox here Button here to calculate The issue i'm having trouble with coding the math formula properly with the textbox, radio buttons, and combobox all in the formula. I'm having problems getting the selected item in the combobox in the equation correctly and the radio buttons as well. As of now when I run the program and caluculate it It says "The Amount …

Member Avatar
Member Avatar
+0 forum 9

I created a form with datagridview for a list of clients. Now, I want to add a Search funtionality for my list, so that the user can just type in the value he wants to see and the row with that value will get selected. Also, I want to add a combobox wherein the user can choose what kind of filter he wants to apply to the Search function (by date, by number, by name...). And I also want the search queries to be non specific and not case-sensitive (I mean if I want to look for the name 'Sarah …

Member Avatar
Member Avatar
+0 forum 2

every combobox selection is replaced with what a user has selected, I want it not to be replaced so that all seleced combobox can be printed

Member Avatar
Member Avatar
+0 forum 3

hi all I have an exercise when I select the value in the combobox will confirm the value on datagridview I wrote a code in combobox of from1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim sQry As String sQry = "SELECT Name FROM dtaStudent" Dim con As SqlConnection = New SqlConnection(sqldb.ConnectionString) Dim da As SqlDataAdapter = New SqlDataAdapter(sQry, con) Dim dt As DataTable = New DataTable() da.Fill(dt) ComboBox1.DisplayMember = "Name" ComboBox1.ValueMember = "ID" ComboBox1.DataSource = dt ComboBox1.Focus() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'code form2.ShowDialog() End …

Member Avatar
Member Avatar
+0 forum 1

this is what i want to do but it seems my code doesn't do what i wanted. when i select an item in cbo_Item i want to loop the corresponding Item_Stock into cbo_QTY where all the numbers below Item_Stock is shown in cbo_QTY...here is my code... Private Sub loop_QTY() Dim qty As Integer sqlstring = "SELECT Item_Stock from tbl_Products as '" & qty & "' WHERE Item_Name = '" & cbo_Items.Text & "' " con.Open() Dim i As Integer For i = 0 To Val(qty) cbo_QTY.Text = i + 1 Next End Sub did i miss anything..please help...

Member Avatar
Member Avatar
+0 forum 2

Hi i m trying to make a combobox that user can choose a value from a table this value then it is saved i have the code really i m stucked on combobox.. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; //The API for accessing and processing data stored in a database import java.sql.*; import java.text.ParseException; // Allows you to convert from string to date or vice versa import java.text.SimpleDateFormat; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JComboBox; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.table.DefaultTableModel; public class Lesson37 extends JFrame{ static …

Member Avatar
Member Avatar
+0 forum 5

hi all, I have a piece of code, I can delete the first value but fails and give notice InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index Private Sub ComboBox1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ComboBox1.KeyDown If ComboBox1.Items.Count > 0 Then If e.KeyCode = Keys.Delete Then ComboBox1.Items.Remove(ComboBox1.SelectedItem) 'or 'ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex) End If End If End Sub thank help !

Member Avatar
Member Avatar
+0 forum 3

Hi friends I want to refresh my combo box . i have even used the combobox.refresh() syntax but it does nothing! need help

Member Avatar
Member Avatar
+0 forum 9

I'm having a ComboBox in which I added items in order provide the user autocomplete for the text he's typing. I am looking for a property of ComboBoxes that could identify if the text was an item of the ComboBox or not. (I would like not to loop each time through its items). I would like do use ComboBox.Text if the item does not exist and ComboBox.SelectedItem if it does. Thanks.

Member Avatar
Member Avatar
+0 forum 4

I would like to do something like this: comboBox6.Items.AddRange(new IEnumerable<int> { Enumerable.Range(1,8).ToArray() } ); (add numbers 1 to 8 to ComboBox Items using an IEnumerable object), but i can't figure out how. Thanks.

Member Avatar
Member Avatar
+0 forum 2

im creating a voting system that add votes to the database but it seems that my update/submit button don't add numbers(INT) in my database. what could be the problem here?help my database schema: | cid | cpos | cfname | cmname | clname | cyr | cparty | votes | | 1 | President | john | ark | smith | 3 | glory | | Imports MySql.Data.MySqlClient Public Class Form4 Dim con As New MySqlConnection Dim cmd As New MySqlCommand Dim da As New MySqlDataAdapter Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load con.ConnectionString = …

Member Avatar
Member Avatar
+0 forum 1

So I have this: private void GetSuppliersList() { ds = oDAL.GetSuppliersList(); cmbSupplier.DataSource = ds.Tables["SuppliersHeader"]; cmbSupplier.DisplayMember = "SupplierName"; cmbSupplier.ValueMember = "SupplierID"; } And I need to display SupplierAddress from my SQL database into a textbox so I thought I might need to get the ID (Supplier ID) of the SelectedValue (Supplier Name) from my combobox to get its SupplierAddress and display it at the event of SelectedIndexChanged. Thanks in advance!

Member Avatar
Member Avatar
+0 forum 3

I have gone through the articles appeared in this forum on the above Area.But it didn't helped me much,As I am new to VB.net. In VB6 I have the following code and it works well. Private Sub CmbBank_GotFocus() CmbBank.BackColor = vbYellow LblMsg = "Select Bank" Dim A, B, C As Integer CmbBank.Clear CmbBank.Text = "SELECT BANK NAME" Set RS = New ADODB.Recordset If RS.State = adStateOpen Then RS.Close RS.Open "SELECT * FROM Receipts", CN, adOpenStatic, adLockOptimistic If TxtMode = "A" Then Do Until RS.EOF CmbBank.AddItem RS!Bank RS.MoveNext Loop Else Do Until RS.EOF A = Len(Left(RS!Bank, 25)) A = 25 - …

Member Avatar
Member Avatar
+0 forum 16

Friends...A small problem I have a combobox in which I want to add list from a field from a ACCESS databas Table.It works well My code is here ACRS.Open "SELECT * FROM Salary1", CN, adOpenStatic, adLockOptimistic Sfm = ACRS!Month Do Until ACRS.EOF CmbSfm.AddItem ACRS!Month ACRS.MoveNext Loop My problem is , I want to populate the field Month ,But the value of Month for every 4 records will be the same.Hence the combobox list will be repeated 4 times by the value of month. I want only the first one of the four records so that the list will not contain …

Member Avatar
Member Avatar
+0 forum 11

The End.