I'll try to be brief in this post. I'm working on a cave generation program that will implement cell automata and marching squares. I'm new to Visual Basic and am wondering if the Canvas class is the best way to draw these black & white squares. For a reference the goal is something similar to this: https://unity3d.com/learn/tutorials/modules/advanced/scripting/procedural-cave-generation-pt1?playlist=17153 Let me know what you think the best graphical option would be for this. I'm looking for something simple and easy to learn!

Member Avatar
+0 forum 0

Hello, how to get id of selected row or clicked cell row in datagrid in vb6.0? Thanks

Member Avatar
Member Avatar
+0 forum 1

Howdy-ho. I am trying to right click on my table and change the cell border color and highlight color of that cell. I have figure out how to give that particular cell focus when I right click it by using int row = fixed.rowAtPoint(evt.getPoint()); int col = fixed.columnAtPoint(evt.getPoint()); fixed.changeSelection(row, col, false, false); fixed.requestFocus(); However when I want to visual distinguish a right click from any other click. Usually a cell with focus looks like this: with the blue thick border around the selected cell, as well as the blue background around everything in that row ![e6ef5c487a6756ad3c6856868a02f596](/attachments/small/3/e6ef5c487a6756ad3c6856868a02f596.png "align-left") How do I …

Member Avatar
Member Avatar
+0 forum 1

Hello good day. Thank you for trying to help. My problem is as follows. A few columns in my table, use a JComboBox as the editor for their cells. Each cell, in a row (via JComboBox) presents the same choices to the user. The user is allowed to choose from the options, just not the same option more than once for that row. That being said what I wish to accopmlish is this: Whenever selections are made from any JComboBox the next cells should present as options the remaining unselected choices. So basically whenever a particular choice is made, I …

Member Avatar
Member Avatar
+0 forum 23

public partial class FrmEndDateSummaryOnLoad : FrmErpSimple { List<string> mVehicleRemainderList; //SMdiForm mMdiParent; string mCurrentUserId; string mCurrentPeriodId; DataTable dataTableVehicleID = new DataTable(); DataTable dataTableVehicleNextKMS = new DataTable(); public FrmEndDateSummaryOnLoad(CErpDataConnection pErpDataConnection, CUserLoginInfo pUserLoginInfo , CRegional pRegional) : base(pErpDataConnection, pUserLoginInfo) { InitializeComponent(); } protected override void OnLoad(EventArgs e) { mCurrentPeriodId = mUserLoginInfo.GetPeriodID(); mCurrentUserId = mUserLoginInfo.GetUserID(); mCommand = mErpDataConnection.CreateCommand(); mConnection = mErpDataConnection.CreateConnection(); // dttxtDate = new SDateTimeMaskedTextBox(); dttxtDate.Focus(); SearchEndDate(); } #region EndDateSummary CDataTable dataTable; public void SearchEndDate() { if (SCUtil.IsDate(dttxtDate.Text)) { //same code as In Else {},on load date textbox is blank.. } else { string sql; string dt = mErpDataConnection.GetDBServerDateTime(); dttxtDate.Text = dt; DateTime …

Member Avatar
Member Avatar
+0 forum 4

Hello good day. Here is my problem: I have retrieved some a couple sets of data from my sql database and saved them in ArrayLists of (custom)types <Student> and <Subject>. I am using a single Table. I want to create a custom AbstractDataModel that displays the data from the ArrayList<Student>. The data that comes from ArrayList<Student> are simply Strings, and this constitutes half of the table. The other half of the table is populated by the user editing the cells via JComboBox editor. These choices are used to carry out calculations in order to populate the ArrayList<Subject>. Problem is, all …

Member Avatar
Member Avatar
+0 forum 6

i want to comare textbox value with datagridview items before adding this textbox value in datagridview

Member Avatar
Member Avatar
+0 forum 5

I've got a JTable called chances_T full of doubles ranging from 0 to 100. I'm trying to set the background color of each cell based on the cell's value. So I built a custom cell renderer: class CustomRenderer extends DefaultTableCellRenderer { @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component c = super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); double chance = Double.parseDouble(String.valueOf(value)); if (chance > 80) { c.setBackground(Color.green); console_TA.append("Worked!\n"); } else if (chance >= 50 && chance < 80) { c.setBackground(Color.yellow); } else if (chance >= 25 && chance < 50) { …

Member Avatar
Member Avatar
+0 forum 8

Hello, I was wondering what a second pair of eyes (or several) might have for opinions on this code? This program is supposed to store a user generated array, and functions which tell the highest, lowest, etc. Mainly, I need help with the "set cell" part, which is supposed to allow the user to access any cell in the array Thanks very much #include <iostream> #include "NumberArray.h" using namespace std; NumberArray::NumberArray(int s) { arrayPointer = new double [s]; // constructor size = s; } NumberArray::~NumberArray() { delete [] arrayPointer; array=NULL; if(arrayPointer!=NULL) //destructor { cout << "inside destructor, just checking" << …

Member Avatar
Member Avatar
+0 forum 1

Trying to access DW on Smartphone (Android) and still getting trouble with the dropdown menus. Trying to access PHP forum, but of course, no hover on mobile, so have to go to Web Design then find a thread with the PHP link. Has anybody got an easier way - I'm a complete ignoramus with regard to Smartphone, so be gentle. :)

Member Avatar
Member Avatar
+0 forum 9

Hello Good day. Here is the problem I am trying to solve. I have a table as seen below. ![232465554203149acd8363d3a4a127ae](/attachments/large/3/232465554203149acd8363d3a4a127ae.jpg "232465554203149acd8363d3a4a127ae") My GOAL: Columns A through G are going to be filled with integers. (I have already created an integer model so that these cells only take integers). As the cells in that range are filled, the Totals column will decrease in number until it reaches zero. So far I have managed to use a TableModelListener to respond to the changing cell values. What I wish to do now is to prevent a cell, *that is being edited*, from *accepting* …

Member Avatar
Member Avatar
+0 forum 14

Hi everyone, I'm working in a project where its required a dynamic insertion of a grup of 3 textfields where one hiels dates. So far I manage to do the insertion part, but Im still with the problem of jquery datepicker only working right on the first(original) textfield. I notice an error when inserting new textfield and trying to access the jquery datepicker "Uncaught TypeError: Cannot read property 'append' of undefined"! I searched the web and i found that it can ve fixed by creating a class on the textfield and adding "'removeClass' or the 'not' ". $('.datepicker').removeClass('hasDatepicker'); I tried …

Member Avatar
Member Avatar
+0 forum 5

I am trying to set the value of cells in an Office 2010 worksheet using this code in Visual Studio 2012: for (int i = 1; i < 5; i++) { xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(i); int columnCounter = 1; foreach (string s in columnNames) { range = ((Excel.Range)xlWorkSheet.Cells[1, columnCounter]); range.Value = s; columnCounter++; } } While stepping through this code it fails every time at the `range.Value = s;` line and goes immediately to another method that closes Excel. It does not give any error messages and so I am lost as to why this isn't working. Can someone please help?

Member Avatar
Member Avatar
+0 forum 2

I want to delete the contents from cell if the content of that cell are similar to the content of the previous cell of last column. i.e If the 10th cell of column 'A' & 10th cell of column 'B' have the identical content then I need to clear that content from column 'B',without deleting the cell itself (i.e content of the cell only not the cell itself).

Member Avatar
Member Avatar
+0 forum 5

Android, Apple, and Blackberry are te biggest smartphone company at this moment, what next vendor or OS will grow up in your opinion?

Member Avatar
Member Avatar
+0 forum 9

i have a table Marks_Entry into my database and i want to enter all students subject marks at a time and i am doing it through a datagrid view . i have made a list of rollno of student and one subject row so i want that user may able to enter the records through a datagridview into a database table ..and i have never worked on it so i dont know to insert datagridview and how to run thw insert query multiple times for all the row of datagrid..can anybody guide me through this

Member Avatar
Member Avatar
+0 forum 1

Hi all I'm trying to shade a cell based on a date difference between column 7 & 8. It seams to work accept column 8 seams to be the one being shaded instead of column 7. I have googled but can't find a solution to have the calculatin being made on when column 8 being loaded but the formatting being applied to column 7. Private Sub gvStatus_CellFormatting(ByVal sender As Object, ByVal e As DataGridViewCellFormattingEventArgs) Handles gvStatus.CellFormatting Dim Closing, Tobemeasured, tobedesign As Date Dim NumberOfWeeks As Integer If Not IsDBNull(gvStatus.Item(6, e.RowIndex).Value) Then Closing = gvStatus.Item(6, e.RowIndex).Value End If Select Case e.ColumnIndex …

Member Avatar
Member Avatar
+0 forum 5

I'm trying to go thru a file with product codes and rateband prices and quantities (productcode, pricea, qtya, priceb, qtyb, pricec, qtyc, priced, qtyd, pricee, qtye). For a certain group of up to 4 productcodes I need to sum up the values of the price cells after testing the qty fields have the same values. Because I don't have any experience with python I was wondering what the most elegant way would be to do this in python.

Member Avatar
Member Avatar
+0 forum 4

My name is Davey Winder, and I am a phoneaphobic. At first glance it would appear that I am anything but alone if the results of a recent study into attitudes towards mobile phone usage are to be believed. But first impressions are often misleading and that's the case here, as unlike me it seems that the majority of people do not have a phobia of simply speaking on the phone (or more accurately having my train of thought interrupted by meaningless telephone conversations when an email will usually suffice) but rather the exact opposite. [URL="http://en.wikipedia.org/wiki/Nomophobia"]Nomophobia[/URL] is the fear of …

Member Avatar
Member Avatar
+2 forum 17

I am trying to change the color of individual cells in a datagridview based on values from the columns. If the CDRGvalue is not blank and the ALOSvalue is greater than the PLOSvalue then I need to change the individual cell back color for the ALOS column (colALOS) and the PLOS column (colPLOS) to red for the patient in that row. Currently, the best I have been able to do is turn the whole line red instead of just the individual cells. Any help, tips, or suggestions are greatly appreciated! Private Sub DataGridView1_CellFormatting(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) …

Member Avatar
Member Avatar
+0 forum 6

i want to put the values from three text boxes into one cell of my datagridview..

Member Avatar
Member Avatar
+0 forum 7

I'm using a MSHFlexGrid (fgdVehicle) to input data from a database ( via a recordset (rsVehicle) ). You can either enter the data into the database in two ways : 1. From the database application 2. From a form. The problem is present in the second method. There are specific textboxes (txtID, txtModel, txtChassis and txtCompany) and a combobox (cboType) to enter the data into the certain fields, and when you click on the "Save" button, the data will get saved to the FlexGrid as a new record (also gets saved to the database at the same time). My problem …

Member Avatar
Member Avatar
+0 forum 1

Here I am Sending you my code ,wherein I want to have total of examfees(column),PromotionFees(column),Totalfees(column) and Balance(column).Examfees are paid in installment in my project The idea if single record is found then it doing calculation of balance=promotionfees-totlafees and if anywhere due to mistyping is value is higher then the respectively msgbox displays error.For single record it is working fine even when I update values in Datagridview.balance shown correctly. But issues is when there are multirecords:when I am doing total of all the row value in promotionfees(column) in totalfees(column) now balance also should show correctly that is happening fine.But when I …

Member Avatar
+0 forum 0

I'd like to add a timestamp to articles I upload to my website, which reads the time and date the article was uploaded. I've got a database, as well as a working connect.php. In this database, I've created a table with a "date" field (type: date). What can I do to get the timestamps working?

Member Avatar
Member Avatar
+0 forum 10

i just need a clear explanation for this: var lastCol = getColumnCount()-1; var lastRow = getRowCount()-1; var table = document.getElementById(TableID); var rowSum; /*Summation of all the values in of rows*/ var columnValue; if(ths == 'on'){ for(var b=1;b<lastRow+1;b++){ rowSum = 0; for(var i=0;i<lastCol-1;i++){ columnValue = table.rows[i].cells[b].childNodes[0].value; if(columnValue != '' && !isNaN(columnValue)){ rowSum = eval(rowSum) + parseInt(columnValue); } table.rows[lastRow].cells[b+2].innerHTML = rowSum; } } }else{ var cIndex = ths.parentNode.cellIndex; rowSum = 0; for(var i=0;i<lastRow;i++) { cIndex+=2; columnValue = table.rows[i].cells[cIndex].childNodes[0].value; if(columnValue != '' && !isNaN(columnValue)){ rowSum = eval(rowSum) + parseInt(columnValue); } } table.rows[lastRow].cells[cIndex].innerHTML = rowSum; } } function timedRefresh(timeoutPeriod) { setTimeout("location.reload(true);",timeoutPeriod); } i get …

Member Avatar
Member Avatar
+0 forum 1

'i am trying to get f_name + m_name + l_name three diferent columns combined from data grid view on cell content click into combobox. [CODE] Private Sub bugdgv_CellContentDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles bugdgv.CellContentDoubleClick Dim row As Integer = bugdgv.CurrentCell.RowIndex frmbug.bugcmbdeliver.Items.Clear() Try obcon.cmd.CommandText = "select d.del_name from deliver_project d,bug b where b.bug_id=d.del_id and d.del_name='" & bugdgv.Item("del_name", row).Value & "'" obcon.con.Open() Dim dr As SqlDataReader dr = obcon.cmd.ExecuteReader If (dr.Read) Then frmbug.bugcmbdeliver.Items.Add(0) End If Catch ex As Exception MsgBox(ex.Message) Finally obcon.con.Close() End Try frmbug.bugcmbassign.Items.Clear() Try 'obcon.cmd.CommandText = "select c.f_name from deliver_project d,bug b where b.bug_id=d.del_id and d.del_name='" & …

Member Avatar
Member Avatar
+0 forum 6

Need help, I need to know on how can VB.net validates the format of each cell on the excel file that it opens, for example, the first row should only be numeric, or cannot be null, is it possible that vb.net can check it before it inserts it in the dataset or data table? how can it be done? thanks

Member Avatar
Member Avatar
+0 forum 4

Hi all, I have created a custom datagridview cell type (which allows the user to either enter text or add an image). This is working as I had planned, with one exception... This new cell type, which is set as the CellTemplate, has a button to the right of the cell which, when clicked, allows the user to browse for the image and it is displayed in the cell. However if the row is a new row (isNewRow) it still added the image, but does not create a new "new row" underneath. Its as if the row with the image …

Member Avatar
Member Avatar
+0 forum 1

Hi. I have an bounded datagridview with cell decimal different formating (N2 and N4). If I enter a 4.5265 value to a cell with N2, I formated this to appear 4.53 ... and this is wonderfull. My problem is when I try to save data ... in my sql table not saved 4.53 value, saved 4.5265 ... and this is my big problem. How this is possible ? What I wrong ? Please help me.

Member Avatar
Member Avatar
+0 forum 4

Hy again , I have another problem now , I have an application with a jTabel , you can double click a cell and you can change the value that is inside it , after you changed the value inside the cell and hit enter the value i enterd remains but i need to hit again enter key to return me the row and column that i need to save later in the database. My question : How can i save the data from the cell after editing was done without needing to hit ENTER key again? My code is …

Member Avatar
Member Avatar
+0 forum 7

The End.