Search Results

Search found 3437 results on 138 pages for 'cell'.

Page 16/138 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Problem with reusing UITableViewCell's

    - by Sheehan Alam
    I have a UITableView that is re-using cells when the user scrolls. Everything appears and scrolls fine, except when the user clicks on an actual row, the highlighted cell displays some text from another cell. I'm not exactly sure why. #define IMAGE_TAG 1111 #define LOGIN_TAG 2222 #define FULL_NAME_TAG 3333 // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; STUser *mySTUser = [[[STUser alloc]init]autorelease]; mySTUser = [items objectAtIndex:indexPath.row]; AsyncImageView* asyncImage = nil; UILabel* loginLabel = nil; UILabel* fullNameLabel = nil; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } else { asyncImage = (AsyncImageView *) [cell.contentView viewWithTag:IMAGE_TAG]; loginLabel = (UILabel *) [cell.contentView viewWithTag:LOGIN_TAG]; fullNameLabel = (UILabel *) [cell.contentView viewWithTag:FULL_NAME_TAG]; } // Configure the cell... cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; CGRect frame = CGRectMake(0, 0, 44, 44); asyncImage = [[[AsyncImageView alloc]initWithFrame:frame] autorelease]; asyncImage.tag = IMAGE_TAG; NSURL* url = [NSURL URLWithString:mySTUser.avatar_url_large]; [asyncImage loadImageFromURL:url]; [cell.contentView addSubview:asyncImage]; loginLabel.tag = LOGIN_TAG; CGRect loginLabelFrame = CGRectMake(60, 0, 200, 10); loginLabel = [[[UILabel alloc] initWithFrame:loginLabelFrame] autorelease]; loginLabel.text = [NSString stringWithFormat:@"%@",mySTUser.login]; [cell.contentView addSubview:loginLabel]; fullNameLabel.tag = FULL_NAME_TAG; CGRect fullNameLabelFrame = CGRectMake(60, 20, 200, 10); fullNameLabel = [[[UILabel alloc] initWithFrame:fullNameLabelFrame] autorelease]; fullNameLabel.text = [NSString stringWithFormat:@"%@ %@",mySTUser.first_name, mySTUser.last_name]; //[NSString stringWithFormat:@"%@",mySTUser.login]; [cell.contentView addSubview:fullNameLabel]; return cell; }

    Read the article

  • How to have localized style when writing cell with xlwt

    - by lfagundes
    I'm writing an Excel spreadsheet with Python's xlwt and I need numbers to be formatted using "." as thousands separator, as it is in brazilian portuguese language. I have tried: style.num_format_str = r'#,##0' And it sets the thousands separator as ','. If I try setting num_format_str to '#.##0', I'll get number formatted as 1234.000 instead of 1.234. And if I open document in OpenOffice and format cells, I can set the language of the cell to "Portuguese (Brazil)" and then OpenOffice will show the format code as being "#.##0", but I don't find a way to set the cell's language to brazilian portuguese. Any ideas?

    Read the article

  • How to change the cell color of a jquery datepicker

    - by MazarD
    Hi, I have a jquery datepicker and I need to be able to change the background color for the selected cell date, I'm trying with something like: $("#fecha").datepicker({ onSelect: function(value, date) { alert(date.css()); } }); hoping that the date parameter refers to the selected cell, but it doesn't seem to work. Any suggestion? //Edit: The solution should let me have different cells with different colors setted dinamically, this is why I'm trying with onSelect instead of changing the css directly. The purpose is to have a calender with events established by the user. Thanks in advance.

    Read the article

  • Inserting a table column with jQuery

    - by fudgey
    I have a table of data that I need to dynamically add a column to. Lets say I have this basic table to start with: <table> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> <tr><td>cell 1</td><td>cell 2</td><td>cell 3</td></tr> </table> I would like to insert a column between cell 1 and cell 2 in each row... I've tried this but it just isn't working like I expect... maybe I need more caffeine. $(document).ready(function(){ $('table').find('tr').each(function(){ $(this).prepend('<td>cell 1a</td>'); }) })

    Read the article

  • ReportViewer Cell Formatting

    - by firedrawndagger
    I need to change the color of a cell in ReportViewer based on its value. 1) I got the first part down - I'm comparing the difference between two numbers like so: =IIf(Fields!variance.Value > 0) 2) Now how do I actually change the visual formatting of the cell? A web standards way would be to add a class - since then you can format the class to whatever you like, e.g. changing borders, typography, bacgkround color etc. Since ReportViewer sucks and doesn't have that functionality what should I use instead? Any hacks I could use?

    Read the article

  • min max coordinate of cells , given cell length in c#

    - by Raj
    Please see attached picture to better understand my question i have a matrix of cells of [JXI] , cell is square in shape with length "a" my question is .. is there a way to use FOR loop to assign MIN,MAX coordinate to each cell taking origin (0,0) at one corner Thanks "freeimagehosting.net/uploads/3b09575180.jpg" i was trying following code but no success int a ; a = 1; for (int J=1; J<=5; J++) { for (int I = 1; I <= 5; I++) { double Xmin = ((I - 1)*a ); double Ymin = ((J - 1) * a); double Xmax = (I * a ); double Ymax = (J * a); } }

    Read the article

  • How to get cell text based on indexPath?

    - by Sheehan Alam
    I have a UITabBarController with more than 5 UITabBarItems so the moreNavigationController is available. In my UITabBarController Delegate I do the following: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { //do some stuff //... UITableView *moreView = (UITableView *)self.tabBarController.moreNavigationController.topViewController.view; moreView.delegate = self; } I want to implement a UITableViewDelegate so I can capture the row that was selected, set a custom view property and then push the view controller: - (void)tableView:(UITableView *)tblView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //how can I get the text of the cell here? } I need to get the text of a cell when the user taps on a row. How can I accomplish this?

    Read the article

  • Cell padding within inline CSS

    - by GregH
    I have a table within a div (see below). How do I add a right padding of say 30px to each cell/column within the table in that div? My understanding is that I have to use inline CSS? Basically, I want each cell to be padded on the right by 30 pixels. <div id="ddTopMenu";> <table border="0" > <tr> <td width=100></td><td >Dictionary</td><td>Search</td><td>Sources</td><td>References</td> </tr> </table> </div>

    Read the article

  • Get DataGridView checkbox cell value?

    - by George
    Hello guys. I'm having a strange issue here. I have a 3 column datagrid that is filled by a connection with the database. So far so good. I have an extra column, of checkbox type. I need to get it's value for perfoming a bulk operation on it. Here is the catch: When all cells are selected, it works fine. But when an user selects any cell that its not the first, software gives me a object reference exception. Here is the code public List<String> GetSelected() { List<String> selected = new List<String>(); foreach(DataGridViewRow row in datagrid.rows) { if ((Boolean)row.Cells[wantedCell].Value == true) { selected.Add(row.Cells[anotherCell]); } } } I tracked down the failure to the if-test, throwing a exception, because the value of the cell is read as null. Any thougths? Thanks

    Read the article

  • UITableView - Color a selectede cell in table (remain colored)

    - by Liron Loop
    Hi In my app i'm using a UITableViewController ("grouped style") which in one of its section I want the user to be able to see what he had selected by making this cell colored and other "uncolored". Doing it by updating all cells' background color and reloading table data, each time user touches a cell (in didSelectRowAtIndexPath:) Problem is that there is some processing made in the didSelectRowAtIndexPath: so the color doesn't get changed right a way, rather in a bit delay after touch was made. (I gusse the processing is the resone for the tiny delay) Is there a better way of doing it? Any help will be appreciated Liron P.S. I'm new to all of this...

    Read the article

  • How to put PrintWriter object content in to table cell

    - by user3599482
    I have a small problem about a content returning from servlet to put in table cell. In javascript I am calling servlet method using post, it returns some content and I have to put it in two different <td> cells. here is my code, In javascript, $.post('<%=request.getContextPath()%>/controller/UserLockController',{'userName':userName,'status':status}, function(data) { document.getElementById("status_"+userName).innerHTML=data; document.getElementById("td_"+userName).innerHTML=data; }); in servlet it writes as, out.println("<td id=\"status_"+inputParam+"\">Locked</td>"); out.println("<td id=\"td_"+inputParam+"\"><a href=\"#\" class=\"btn btn-sm btn-primary unlockBtn\" id=\"togBtn_"+inputParam+"\" onClick=\"LockAccount('"+inputParam+"','"+status+"')\">UnLock</td>"); Here content is returning but problem is the both <td> return from servlet will fit in single cell of html table. how to solve this please help me.

    Read the article

  • How to sort the row contents on table cell by using date

    - by MS Nathan
    Hi i am new to iphone application development.i am developing RSS feed Reader it has number of different RSS feeds. In my application (XML parsing), i want to display the content of the row on cell for particular date and with their corresponding title, description (in my application, i am using three labels for displaying title, date and description) on table view cell after parsing xml data. And i want to sort the all kinds of RSS feeds row contents(title, date, description) depends upon the date in single another UIViewController and for each RSS feed has a separate ViewController. thanks in advance.

    Read the article

  • FindControl table cell

    - by rlb.usa
    I want to reference a table cell via it's string ID in my code like this FindControl("tdAnswer_a") because I am manipulating string ID names. The ASPX code looks like this : <table>...<td ID="tdAnswer_a" runat="server" visible="true"> But FindControl is not able to find the table cell. When I reference it by ID like this : tdAnswer_a.Visible = true; in my codebehind, it has no problems. (This is not part of a repeater or gridview). How can I FindControl my table cells via string ID names?

    Read the article

  • UITableView: Highlighted cell after switching back views

    - by Matthias
    Hi, I'm using a UINavController together with some UITableViews to display a kind of drill down for some data (e.g. like the Contact App). Works well. The only problem I have is, when I select a cell in the first table view it is highlighted, then the view switches to the next level and then, if I go back to the first level, the cell is still highlighted. So, how can I reset the highlighting when switching back? Thanks for your help. Regards Matthias

    Read the article

  • How to implement HeightMap smoothing using Thrust

    - by igal k
    I'm trying to implement height map smoothing using Thrust. Let's say I have a big array ( around 1 million floats). A known graphics algorithm to implement the above problem is to calculate the average around a given cell. If for example I need to calculate the value at a given cell[i,j] what I will basically do is: cell[i,j] = cell[i-1,j-1] + cell[i-1,j] + cell[i-1,j+1] + cell[i,j-1] + cell[i,j+1] + cell[i+1,j -1] + cell[i+1,j] + cell[i+1,j+1] cell[i,j] /=9 That's the CPU code. Is there a way to implement it using thrust? I know that I could use the transform algorithm. But I'm not sure it's correct to access different cells which are occupied but different threads (banks conflicts and so on).

    Read the article

  • How to set cell's background in HTML table ?

    - by misha-moroshko
    I would like to set the background of a cell in HTML table to be like this. What are my options besides using an image as background ? Are there any predefined backgrounds like this ? Maybe dotted, or diagonal lines backgrounds ? In case of image background, if I don't know in advance what would be the size of the cell, what image size should I take ? How to make it be repetitive so it would look nice ? Any HTML/CSS/Javascript/jQuery suggestions are welcome :)

    Read the article

  • Vertical positioning of text in table cell

    - by Robert
    When I place an image followed by text in a table cell, the vertical alignment of the text shifts down compared to text in adjacent cells. I tried using a line-height CSS property, but it didn't seem to have an affect. In the following example, I need "123 Description" to be flush with "cell one." Also, there is a space between the image and "123" by default. How can I adjust that - negative margins perhaps? <html <head <style type="text/css" table { border-collapse: collapse; } td { border: thin solid; width: 10em;} /* .adjust-text { line-height: 1.3em; } */ </style </head <body <table <tbody <tr <tdcell one</td <td <img src="small-star.png" / <span class="adjust-text"123 Description</span </td </tr </tbody </table </body </html

    Read the article

  • Substitution for display='table-cell' in IE 7

    - by Jeny
    Hi friends, document.getElementById(id).style.display ='table-cell'. This gives error message in IE, this is IE bug or any other solutions please give any other solutions. IE7 doesn't support this property. this is my coding. Even Firefox and Chrome are accepted. My problem is IE. Please friends give solution... var cont2 = document.createElement('div'); cont2.style.display = "table-cell"; cont2.style.verticalAlign = "middle"; cont2.style.lineHeight = 100+"%"; cont2.style.padding = 10+"px"; cont2.appendChild(body);

    Read the article

  • convert string array to cell in MATLAB

    - by Maddy
    I need to output a cell to an excel file. Before this I need to convert a date column of integers to datestrings. I know how to do this, but I am not able to put this new string array back into the cell - mycell = { 'AIR' [780] [1] [734472] [0.01] ; ... 'ABC' [780] [1] [734472] [0.02]} I did this -- dates = datestr(cell2mat(mycell(:,4))) ; What I need as an answer is: {'AIR' [780] [1] '14-Dec-2010' [0.01] ; 'ABC' [780] [1] '23-Dec-2010' [0.03] ; } so that I can now send it to an excel file using xlswrite.m

    Read the article

  • UITableView cell selection disabled and UITableViewHeader Enabled

    - by andyPaul
    I am adding a my header view to self.tableView.tableHeaderView=headerView; This tableView has 10 cells. I want to disable the cell Selection but, headerView touch events must be enabled. To achieve this I added the following code: self.tableView.userInteractionDisabled=YES; self.headerView.userInteractionDisabled=NO; self.headerView.exclusiveTouch=YES; Where I am wrong? Basic idea of implementation is , If headerView is enabled then cell selection is disabled and vice-versa.

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >