Search Results

Search found 1164 results on 47 pages for 'labels'.

Page 29/47 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Item Renderer having trouble updating

    - by duder
    I have a list ItemRenderer that has 2 states. When it initializes, I set it to 1 state and listen for an event that switches it to state 2. protected function onCreationComplete(event:FlexEvent):void{ currentState = "state1"; addEventListener(CustomEvent.Event1, switch); } protected function switch(event:FlexEvent):void{ currentState = "state2"; } The difference between the 2 states is that I hide/show some labels. The problem is that it doesn't work. I still see the visual of the old state, even though if I Alert.show(currentState), it shows the correct state name. I've tried adding the line invalidateDisplayList(); inside the switch function but still no luck. protected function switch(event:FlexEvent):void{ currentState = "state2"; invalidateDisplayList(); } What am I doing wrong. Any ideas how I can get this ItemRenderer to really update?

    Read the article

  • CSS class equivalent for LaTeX

    - by Ryan Scott Bardsley
    I am trying to figure out if there is a way to apply the CSS methodology to the LaTeX template I am building. What I would like to do is to have a set of classes that apply a specific style treatment to the bracketed words. For example: If I have three paragraphs of text, I want to have all of the paragraphs have [0.5cm] of spacing after the last line without having to add \\[0.5cm] after each paragraph. Is there a LaTeX equivalent of defining the treatment for all paragraphs in the preamble so that it cascades throughout my document? The equivalent of: <style> p {padding-bottom:0.5cm} </style> I want to be able to specify multiple version of these CSS-like LaTeX classes throughout my document, so I don't need a specific solution. I need help understanding how to add custom labels/names/classes to the preamble and an example of how to use them in the document itself. Thanks! Ryan

    Read the article

  • Sum of path products in DAG

    - by Jules
    Suppose we have a DAG with edges labeled with numbers. Define the value of a path as the product of the labels. For each (source,sink)-pair I want to find the sum of the values of all the paths from source to sink. You can do this in polynomial time with dynamic programming, but there are still some choices that can be made in how you decompose the problem. In my case I have one DAG that has to be evaluated repeatedly with different labelings. My question is: for a given DAG, how can we pre-compute a good strategy for computing these values for different labelings repeatedly. It would be nice if there was an algorithm that finds an optimal way, for example a way that minimizes the number of multiplications. But perhaps this is too much to ask, I would be very happy with an algorithm that just gives a good decomposition.

    Read the article

  • NSString stringWithFormat: with C array?

    - by Chris Long
    Hi, I'm writing a program that calculates the Jacobi algorithm. It's written in Objective-C since it runs on a Mac, but the majority is written in standard C. I'm using a two-dimensional C array and an NSArray containing 5 NSTextField labels. The following code yields an EXC_BAD_ACCESS error: for ( int i = 0; i < 5; i++ ) { NSString *resultString = [NSString stringWithFormat:@"%g", matrix[i][i] ]; [[resultLabels objectAtIndex:i] setStringValue:resultString]; // error line } Any help?

    Read the article

  • JLabel withing another JLabel

    - by out_sider
    I want to do a very simple thing with java swing and I'm not being able to. I added a jLabel as it is the only object using java swing that can hold an image (using the icon property)...at least I wasn't able to set an image using other objects. Now I want to add another jlabel in top of the first one with another image so it can be "clicked" independently from the "background" label. But whenever I try to add it using the graphical editor or by doing jLabel1.add(jLabel2) it doesn't work...it simply sets next to the label1 but not on top of it. This is in order to do a java application like the Tic Tac Toe game...so I can have the background which are squares (first label) and the others the "X" and "O". board This might be the board and I want to put labels on each square so they can be the pieces.

    Read the article

  • Multline Text in a WPF Button

    - by Paul
    How do I get multi-line text on a WPF Button using only C#? I have seen examples of using <LineBreak/> in XAML, but my buttons are created completely programmatically in C#. The number and labels on the buttons correspond to values in the domain model, so I don't think I can use XAML to specify this. I have tried the naive approach below, but it does not work. Button b = new Button(); b.Content = "Two\nLines"; or b.Content = "Two\r\nLines"; In either case, all i see is the first line ("Two") of the text.

    Read the article

  • How to align centre a custom label in highcharts

    - by Chrissy
    See a jsfiddle example I am trying to align the custom label in the /labels/items JSON element to hang right under the title and subtitle. Playing with firebug I can alter the SVG text element for the label and add text-align='middle' and change the x='' attribute to have the same value as the title's x attribute. This makes it perfectly align under the title and stay there when resized but I can't figure out how to make the highcharts library generate this source. Maybe there is a better way to add another label under the subtitle?

    Read the article

  • Looking for help with a design for a simple C# calendar app.

    - by Vladislav
    As a personal project, I'm putting together a C# WPF calendar. I'm stuck on coding the calendar screen - specifically, the 5x7 grid of days. I've first tried to code it using elements like Panels, Labels, and Buttons. I've decided that was too cumbersome. I've then decided to use GDI to draw the calendar myself. I now have a wonderful layout - but I'm not sure how to handle interactive regions of the calendar. (Say, Previous/Next month, clicking on any particular day...) After rendering the calendar screen, should I be creating button objects for all those tasks, and assigning onClick handlers to them? Or is there an alternative solution? Thanks in advance. -Vladislav

    Read the article

  • iphone - UIViewController header view errors

    - by Fiona
    Hi there, So to give a little background: I've an app that has a UITableViewController- (ContactDetailViewController) In this view at the top, I require a few labels and buttons, followed by a group style tableview. So I've created a nib file containing these elements. (ContactHeaderView.xib) Then in the viewDidLoad of ContactDetailViewController I've loaded this nib as the headerView. See implementation file below: #import "ContactDetailViewController.h" #import "DisplayInfoViewController.h" #import "ActionViewController.h" @implementation ContactDetailViewController @synthesize name; @synthesize date; @synthesize nextAction; @synthesize nameLabel; @synthesize usernameLabel; @synthesize nextActionTextField; @synthesize dateLabel; @synthesize contactInfoButton; @synthesize backgroundInfoButton; @synthesize actionDoneButton; - (void)viewDidLoad { [super viewDidLoad]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } #pragma mark Table view methods - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 3; } - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if (section == 0){ UIViewController *chv = [[[UIViewController alloc] initWithNibName:@"ContactHeaderView" bundle:nil] autorelease]; // self.nameLabel.text = self.name; return chv.view; }else{ return nil; } } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ return 300.0; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } // Set up the cell... return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; } /* // Override to support conditional editing of the table view. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { // Return NO if you do not want the specified item to be editable. return YES; } */ - (void)dealloc { [name release]; [date release]; [nextAction release]; [nameLabel release]; [usernameLabel release]; [nextActionTextField release]; [dateLabel release]; [contactInfoButton release]; [backgroundInfoButton release]; [actionDoneButton release]; [super dealloc]; } -(IBAction)displayContactInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Contact Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)displayBackgroundInfo:(id)sender{ DisplayInfoViewController *divc = [[DisplayInfoViewController alloc] init]; divc.textView = self.nextAction; divc.title = @"Background Info"; [self.navigationController pushViewController:divc animated:YES]; [divc release]; } -(IBAction)actionDone:(id)sender{ ActionViewController *avc = [[ActionViewController alloc] init]; avc.title = @"Action"; avc.nextAction = self.nextAction; [self.navigationController pushViewController:avc animated:YES]; [avc release]; } @end Here's the Header File: #import <UIKit/UIKit.h> @interface ContactDetailViewController : UITableViewController { NSString *name; NSString *date; NSString *nextAction; IBOutlet UILabel *nameLabel; IBOutlet UILabel *usernameLabel; IBOutlet UITextField *nextActionTextField; IBOutlet UILabel *dateLabel; IBOutlet UIButton *contactInfoButton; IBOutlet UIButton *backgroundInfoButton; IBOutlet UIButton *actionDoneButton; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSString *date; @property (nonatomic, retain) NSString *nextAction; @property (nonatomic, retain) IBOutlet UILabel *nameLabel; @property (nonatomic, retain) IBOutlet UILabel *usernameLabel; @property (nonatomic, retain) IBOutlet UITextField *nextActionTextField; @property (nonatomic, retain) IBOutlet UILabel *dateLabel; @property (nonatomic, retain) IBOutlet UIButton *contactInfoButton; @property (nonatomic, retain) IBOutlet UIButton *backgroundInfoButton; @property (nonatomic, retain) IBOutlet UIButton *actionDoneButton; -(IBAction)displayContactInfo: (id)sender; -(IBAction)displayBackgroundInfo: (id)sender; -(IBAction)actionDone: (id)sender; @end However when I run it, I get the following error message: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key nameLabel.' In IB I've hooked up the labels/buttons/textbox to the File's Owner (set the File's Owner Class to: ContactDetailViewController) Anyone any idea what I'm doing wrong? Regards, Fiona

    Read the article

  • How to set the Cell height as dynamically in iPhone?

    - by Pugal Devan
    Hi Friends, In my apps, i have created table view and displayed the images and the labels in the table view. I have downloaded the image and set the image height into the another class, so i have set the image height as delegate value. In my problem is, heightForRowAtIndexPath method is call very earlier and it never calls again. So how i set the cell height depends on the image height? - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { In Console: the height of the image is --------------------------0.000000 the height of the image is --------------------------0.000000 the height of the image is --------------------------0.000000 } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { In Console: the height of the image is --------------------------98.567039 the height of the image is --------------------------300.000000 the height of the image is --------------------------232.288406 } Is any possible to call the heightforRowAtIndexPath method inside the cellForRowAt method. Because i have set the cell frame size and height depends on the image height. So how can i set the cell height depends on the image height?, please guide me. Thanks!

    Read the article

  • How to make awkward pivot of sql table in MS SQL Server 2005?

    - by Oliver
    I have to rotate a given table from an sql server but a normal pivot just doesn't work (as far as i tried). So has anybody an idea how to rotate the table into the desired format? Just to make the problem more complicated, the list of given labels can vary and it is possible that a new label name can come into at any given time. Given Data ID | Label | Numerator | Denominator | Ratio ---+-----------------+-------------+---------------+-------- 1 | LabelNameOne | 41 | 10 | 4,1 1 | LabelNameTwo | 0 | 0 | 0 1 | LabelNameThree | 21 | 10 | 2,1 1 | LabelNameFour | 15 | 10 | 1,5 2 | LabelNameOne | 19 | 19 | 1 2 | LabelNameTwo | 0 | 0 | 0 2 | LabelNameThree | 15 | 16 | 0,9375 2 | LabelNameFive | 19 | 19 | 1 2 | LabelNameSix | 17 | 17 | 1 3 | LabelNameOne | 12 | 12 | 1 3 | LabelNameTwo | 0 | 0 | 0 3 | LabelNameThree | 11 | 12 | 0,9167 3 | LabelNameFour | 12 | 12 | 1 3 | LabelNameSix | 0 | 1 | 0 Wanted result ID | ValueType | LabelNameOne | LabelNameTwo | LabelNameThree | LabelNameFour | LabelNameFive | LabelNameSix ---+-------------+--------------+--------------+----------------+---------------+---------------+-------------- 1 | Numerator | 41 | 0 | 21 | 15 | | 1 | Denominator | 10 | 0 | 10 | 10 | | 1 | Ratio | 4,1 | 0 | 2,1 | 1,5 | | 2 | Numerator | 19 | 0 | 15 | | 19 | 17 2 | Denominator | 19 | 0 | 16 | | 19 | 17 2 | Ratio | 1 | 0 | 0,9375 | | 1 | 1 3 | Numerator | 12 | 0 | 11 | 12 | | 0 3 | Denominator | 12 | 0 | 12 | 12 | | 1 3 | Ratio | 1 | 0 | 0,9167 | 1 | | 0

    Read the article

  • iPhone Live Video Stream Media Player

    - by happyhammer83
    I'm hoping to make an app that streams live video that has a view placed on top with labels and a button on it. From my research and testing of the http video streaming feature (available since iPhone 3.0 OS), it seems that you create a webview that points to the index html that contains the converted video stream, and this displays as a quicktime video in the app. This means that I don't have control over the Media Player that is opened. Does anyone know how you can control this? I know that the Apple's MoviePlayer sample code shows you how to place views on top of a MediaPlayer video, but how can this be done with a http live stream? Thanks in advance.

    Read the article

  • Ok to use VirtualProtect to change resource in Delphi?

    - by user257188
    I'm working on a simple localization effort in D2010. I'm handling all strings on forms because ETM seems like overkill for my needs, as did other 3rd party tools... (although I'm not so sure at this point!) Is the code below for changing the Const.pas strings considered safe to change the button labels on standard message boxes? procedure HookResourceString(rs: PResStringRec; newStr: PChar); var oldprotect: DWORD; begin VirtualProtect(rs, SizeOf(rs^), PAGE_EXECUTE_READWRITE, @oldProtect); rs^.Identifier := Integer(newStr); VirtualProtect(rs, SizeOf(rs^), oldProtect, @oldProtect); end; const NewOK: PChar = 'New Ok'; NewCancel: PChar = 'New Cancel'; Procedure TForm.FormCreate; begin HookResourceString(@SMsgDlgOK, NewOK); HookResourceString(@SMsgDlgCancel, NewCancel); end;

    Read the article

  • Multline Text in a WPF Button through C#

    - by Paul
    How do I get multi-line text on a WPF Button using only C#? I have seen examples of using <LineBreak/> in XAML, but my buttons are created completely programmatically in C#. The number and labels on the buttons correspond to values in the domain model, so I don't think I can use XAML to specify this. I have tried the naive approach below, but it does not work. Button b = new Button(); b.Content = "Two\nLines"; or b.Content = "Two\r\nLines"; In either case, all i see is the first line ("Two") of the text.

    Read the article

  • Is it good to use .settings for storing controls text data?

    - by Zenya
    In my WinForms applications I often put the controls text data (form title, labels texts, button captions, etc.) into a .settings (feature automatically generated by Visual Studio - based on the ApplicationSettingsBase class). In particular, Add a form or a control. In Solution Explorer add a new string item into the application scope of the settings file. Bind the control text property with the corresponding item of the settings file (through the property binding). Good point of this is that all my text data is collected in one place and easy to check and edit. Also it is convenient when I want to use the same text for several controls. However, I haven't heard that somebody uses the .settings such way. In tutorials for creating multilingual applications, for example, it is recommended to enter texts directly into the control property. So, is it good practice to use .settings for storing controls text data? Brief conclusion from the answers: Storing controls text data in the .settings is not common practice.

    Read the article

  • Intermec PF8t printer - print output with wrong orientation

    - by Xience
    I am using an Intermec PF8t for label printing. My labels are the size of 40mm(width) and 20mm (height) and they are rendered in a crystal report from where I print them dynamically. The problem is that no matter what the page orientation I specify either in crystal report or in printer settings, the result is printed vertically(i.e. my output gets rotated by 90 degrees) whereas I want it to print horizontally (as in normal left to right printing) . Strangely, when I print the label at design time, everything prints as it should. One important thing to mention is that i print my label report programmatically using crystal reprot's PrintToPrinter() method. Any ideas... I have pretty much exhausted all the information available at intermec's portal but to no avail.

    Read the article

  • Reset UITextField's original placeholder text

    - by Michael
    I'm adding some user feedback mechanism into my app. The user types some comments into a text field and when that editing is done it updates a UITextView. Then when the user hits the submit button and moves on in the app the user may have need to send more feedback from the same form for a different item. I can reset the other fields and labels in the app to their default values when I hide the view, but not the textField (?). How can I reestablish the placeholder text next time the user accesses this view? Your suggestions are humbly appreciated.

    Read the article

  • Adding data in multiple tables in vb.net

    - by user225269
    This is a winform and I'm using mysql as a database, here is my code: I'm trying to add data into multiple tables. If TextBox14.Text = "" Or TextBox7.Text = "" Or TextBox10.Text = "" Then MsgBox("Please fill up the fields with a labels in bold letters!", MsgBoxStyle.Information) cn = New MySqlConnection("Server=localhost; Database=school;Uid=root;Pwd=nitoryolai123$%^;") 'provider to be used when working with access database cn.Open() cmd = New MySqlCommand("select * from parents, mother, father", cn) cmd.CommandText = "insert into parents values('" + idnum + "','" + p_contact + "','" + p_ad + "')" cmd.CommandText = "insert into mother values('" + idnum + "','" + mother + "','" + mother_occu + "')" cmd.CommandText = "insert into father values('" + idnum + "','" + father + "',''" + father_occu + "')" cmd.ExecuteNonQuery() I get this error, please help: Index and length must refer to a location within the string. Parameter name: length

    Read the article

  • How to add two label in one gridbox?

    - by Jessy
    Hello everyone, How can I add two label in the same grid box? e.g. in row 1, col 1 the will be 2 labels? The code below will add the label in two different grid. JPanel chckBox = new JPanel(new GridLayout(1,8,3,3)); JLabel label1 = new JLabel("A"); JLabel label2 = new JLabel("B"); ... chckBox.add(label1); chckBox.add(label2); ...

    Read the article

  • UI form component for ASP NET MVC

    - by Bugeo
    Hi I'd like to find a component that help me to build input forms in asp MVC. I find that ther are many components (grid, tree, tab...) but not a "Form component". I know that i can use the HTML HELPER (.labelfor(.. .inputTextFor(... ) ..but i don't like to write the html tags around the fields and labels ( ... ) I want that all the form in my application look similar and, if a change is needed i want to make it in one place ( ex in the "FormComponentFactory()" for example ) I created my own FormComponent but i find myself reinvent the wheel..

    Read the article

  • turning open source software into a consulting business ?

    - by sofreakinghigh
    just some general and specific questions about running a business which uses open source software and sells training, services, and other value added solutions utilizing the open source asset(s). 1) how much modification do you need to make to an existing open source software/framework to give a new brand ? open source (GPLv3) branding issues here.... for ex) Mambo and Joomla, i think they are pretty much same ? but they have different labels. 2) Is there a disadvantage of promoting open source software/framework/suite in hopes of selling value added services and solutions on top of the Open source asset ? 3) can Open source assets be marketing point for lowered Total Ownership Cost and transparency ? meaning, clients will not be using some mysterious, opaque proprietary asset ? 4) is competition fierce? cost of developing software is non existing because you are using an open source asset. barrier to entry is minimal ??

    Read the article

  • Jquery Hide table rows

    - by tomasz
    Hi there I am hiding a bunch of textboxes and it works fine, the problem is, the textboxes are in a table, so I also need to hide the corresponding labels. the structure is something like this <tr> <td> Label </td> <td> InputFile </td> </tr> in fact its just easier if I hide the rows that have a fileinput , can someone help please

    Read the article

  • R: Creating Custom Shapes with ggplot

    - by Brandon Bertelsen
    Full Disclosure: This was also posted to the ggplot2 mailing list. (I'll update if I receive a response) I'm a bit lost on this one, I've tried messing around with geom_polygon but successive attempts seem worse than the previous. The image that I'm trying to recreate is this, the colours are unimportant, but the positions are: In addition to creating this, I also need to be able to label each element with text. At this point, I'm not expecting a solution (although that would be ideal) but pointers or similar examples would be immensely helpful. One option that I played with was hacking scale_shape and using 1,1 as coords. But was stuck with being able to add labels. The reason I'm doing this with ggplot, is because I'm generating scorecards on a company by company basis. This is only one plot in a 4 x 10 grid of other plots (using pushViewport) Note: The top tier of the pyramid could also be a rectangle of similar size.

    Read the article

  • Recommendations for a google finance-like interactive chart control

    - by Chris Farmer
    I need some sort of interactive chart control for my .NET-based web app. I have some wide XY charts, and the user should be able to interactively scroll and zoom into a specific window on the x axis. Something that acts similar to the google finance control would be nice, but without the need for the date labels or the news event annotations. Also, I'd prefer to avoid Flash, if that's even possible. Can someone please give some recommendations of something that might come close? EDIT: the "real" google timeline visualization is for date-based data. I just have numeric data. I tried to use that control for non-date data, but it seems to always want to show a date and demands that the first data column actually be a date.

    Read the article

  • .NET pie chart: how to add text to slices and rotate chart

    - by Sajee
    The code below creates a 24 slice pie chart. How do I: Add text labels to each slice a la "Wheel of Fortune". Rotate the pie chart? I want it to spin like "Wheel of Fortune". private void DrawPieChart() { Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); Rectangle rect = new Rectangle(0, 0, 300, 300); float angle = 0; Random random = new Random(); int sectors = 24; int sweep = 360 / sectors; for(int i=0; i&lt;24;i++) { Color clr = Color.FromArgb(random.Next(0, 255),random.Next(0, 255), random.Next(0, 255)); g.FillPie(new SolidBrush(clr), rect, angle, sweep); angle += sweep; } g.Dispose(); }

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >