LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-13-2006, 10:04 AM   #1
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Rep: Reputation: 30
monodevelop ide labels


hello all im trying to use the monodevelop interface designer to make an application.

on this form i have a few buttons and a few labels as you would expect however i can only modify the labels in the interface designer.

i.e. i want to change the text inside one of these labels, the name of the label is lblAns and its text field is blank.

so you would have thought you would type something like:

lblAns.Text( "my new text" );

however i get this error:
Code:
[Task:File=/home/cookie/doc/uni/bsc/cnpa/assignment_2/practical_8/src/part_2/learning_bridge/learning_bridge/MainWindow.cs, Line=44, Column=3, Type=Error, Description=The name `lblAns' does not exist in the context of `MainWindow'(CS0103)
???? ????

ive even tried the old glade method( i didnt expect this to work ) at the top of the form:

[Widget] Gtk.Label lblAns;

however this also didnt work. please help, its driving me right up the wall!!!!

Last edited by trscookie; 06-14-2006 at 01:33 AM.
 
Old 06-14-2006, 02:03 AM   #2
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Original Poster
Rep: Reputation: 30
anyone?
 
Old 06-14-2006, 02:58 AM   #3
trscookie
Member
 
Registered: Apr 2004
Location: oxford
Distribution: gentoo
Posts: 463

Original Poster
Rep: Reputation: 30
the only way i can find to do it is to include glade then assign label to a widget:

Code:
using System;
using Gtk;
using Glade;

public class MainWindow: Gtk.Window
{	

	[Widget] Gtk.Label label1;

	public MainWindow (): base ("")
	{
		Stetic.Gui.Build (this, typeof(MainWindow));
	}
	
	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
	{
		Application.Quit ();
		a.RetVal = true;
	}

	protected virtual void button1_clicked(object sender, System.EventArgs e) {
		label1.Text = "hello";
	}
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MonoDevelop and KDevelop Help pandorazbox Slackware 18 04-18-2006 06:33 AM
setting up MonoDevelop Nau Mandriva 5 01-15-2006 03:38 AM
MonoDevelop troubles nagromo Linux - Software 1 12-15-2005 03:23 AM
reorder partition lables Rojahon Linux - Hardware 2 07-09-2005 06:29 PM
software for printing cd lables after burning tatwell Linux - Software 3 03-27-2004 06:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration