Here is my code in TreeView in gtk. Please help me im new to gtk
Gtk.TreeViewColumn activeColumn = new Gtk.TreeViewColumn ();
activeColumn.Title = "Active";
activeColumn.Expand = true;
activeColumn.Sizing = TreeViewColumnSizing.Fixed;
activeColumn.MinWidth = 100;
Gtk.CellRendererPixbuf activeCell = new Gtk.CellRendererPixbuf ();
activeColumn.PackStart (activeCell, true);
activeColumn.AddAttribute (activeCell, "pixbuf", 6);
Related
Any advice greatly appreciated.
I'm trying to dynamically create a tab, and inside of that tab, create a new rdp control.
I've got the tab creation fine. The RDP session seems like it's running through the code, but it never renders anything on the screen and never errors out.
I have the tab presented, but with no content.
Thanks.
TabPage myTabPage = new TabPage(tabtitle);
tabControl1.TabPages.Add(myTabPage);
AxMsTscAxNotSafeForScripting rdp4 = new AxMSTSCLib.AxMsTscAxNotSafeForScripting();
((System.ComponentModel.ISupportInitialize)(rdp4)).BeginInit();
rdp4.CreateControl();
myTabPage.Controls.Add(rdp4);
rdp4.Dock = System.Windows.Forms.DockStyle.Fill;
rdp4.Enabled = true;
rdp4.Location = new System.Drawing.Point(3, 3);
rdp4.Name= targetdevice;
rdp4.OcxState = ((System.Windows.Forms.AxHost.State)(new ComponentResourceManager(typeof(Form1)).GetObject("rdp4.OcxState")));
rdp4.Size = new System.Drawing.Size(574, 529);
rdp4.TabIndex = 0;
var settings = (MSTSCLib.IMsRdpClientAdvancedSettings8)rdp4.AdvancedSettings;
settings.allowBackgroundInput = 1;
settings.ClientProtocolSpec = MSTSCLib.ClientSpec.FullMode;
settings.ConnectToServerConsole = true;
settings.EnableCredSspSupport = true;
settings.EncryptionEnabled = 1;
settings.SmartSizing = true;
rdp4.DesktopHeight = 768;
rdp4.DesktopWidth = 1366;
rdp4.Server = targetdevice;
rdp4.UserName = txt_user.Text;
IMsTscNonScriptable secured = (IMsTscNonScriptable)rdp4.GetOcx();
secured.ClearTextPassword = txt_password.Text;
rdp4.Connect();
tabControl1.SelectedTab = myTabPage;
I am using DGVPrinter class for printing my windows form data. after gridview unable to print any text
DGVPrinter printer = new DGVPrinter();
Bitmap bitmap1 = new Bitmap(#"D:\Aur.jpg");
DGVPrinter.ImbeddedImage img1 = new DGVPrinter.ImbeddedImage();
img1.theImage = bitmap1; img1.ImageX = 3; img1.ImageY = 3;
img1.ImageAlignment = DGVPrinter.Alignment.Right;
img1.ImageLocation = DGVPrinter.Location.Header;
printer.ImbeddedImageList.Add(img1);
printer.SubTitle = getprocess_setvalupar();
printer.SubTitleAlignment = StringAlignment.Far;
printer.SubTitleFormatFlags = StringFormatFlags.DirectionRightToLeft;
printer.PageNumbers = true;
printer.PageNumberInHeader = true;
printer.PorportionalColumns = true;
printer.HeaderCellAlignment = StringAlignment.Center;
printer.Footer = GetSignatureFooter("XXXXX Ltd");
printer.FooterSpacing = 15;
printer.PrintDataGridView(dataGridView1);
I am unable to print some text after gridview. If i tried to call function after printer.PrintDataGridView(dataGridView1);text not displaying
I am able to print subtitle before gridview in page. but unable after gridview.
This is all of the code regarding my DataGridView. Is there anything that could cause Refresh() not to work?
this.usersDataGridView.AllowUserToAddRows = false;
this.usersDataGridView.AllowUserToDeleteRows = false;
this.usersDataGridView.AutoGenerateColumns = false;
this.usersDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.usersDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.iDDataGridViewTextBoxColumn,
this.uSERNAMEDataGridViewTextBoxColumn,
this.nAMEDataGridViewTextBoxColumn,
this.sURNAMEDataGridViewTextBoxColumn,
this.pASSWORDDataGridViewTextBoxColumn,
this.pERMISSIONDataGridViewTextBoxColumn});
this.usersDataGridView.DataSource = this.usersBindingSource1;
this.usersDataGridView.Location = new System.Drawing.Point(9, 9);
this.usersDataGridView.Name = "usersDataGridView";
this.usersDataGridView.ReadOnly = true;
this.usersDataGridView.Size = new System.Drawing.Size(488, 291);
this.usersDataGridView.TabIndex = 0;
this.usersDataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.usersdataGridView_RowClick);
I apologize in advance if this question has been answered, but I could not find answer that could help me.
try this:
dataGridView1.DataSource = typeof(DataSet);
dataGridView1.DataSource = this.usersBindingSource1;
can I use only textblock as the only content for transitioning control in mahapps metro. I tried this but it doesn't work as excepted. I am not a wpf expert . Can anyone suggest what is wrong in this? This is what I have tried
StackPanel sp = new StackPanel();
Image imgx = new Image();
Image imgy = new Image();
TextBlock tb = new TextBlock();
if (x == 1)
{
x = 0;
tb.Text = "X = 1";
imgy.Visibility = Visibility.Hidden;
imgx.Visibility = Visibility.Visible;
var uriSource = new Uri("images/blank-cd.png.png", UriKind.Relative);
imgx.Source = new BitmapImage(uriSource);
sp.Children.Add(imgx);
sp.Children.Add(tb);
SecondcustomTransitioning.Content = sp;
}
else if (x == 0)
{
x = 1;
tb.Text = "X = 1";
imgx.Visibility = Visibility.Hidden;
imgy.Visibility = Visibility.Visible;
var uriSource = new Uri("images/placeholder_person.gif", UriKind.Relative);
imgy.Source = new BitmapImage(uriSource);
sp.Children.Add(imgy);
sp.Children.Add(tb);
SecondcustomTransitioning.Content = sp;
}
I am trying to get the Telerik RadGridview control to filter, and am not having any luck. I am getting data back, and sorting is working. The FilterExpressionChanged is firing. Can someone spot what I'm doing wrong?
Data retrieval:
public void LoadData()
{
DataSet oDataSet = new DataSet();
using (SqlConnection oConnection = new SqlConnection(frm_Main.GetConnectionString()))
{
using (SqlCommand oCommand = new SqlCommand())
{
oConnection.Open();
oCommand.Connection = oConnection;
oCommand.CommandText = "SELECT * FROM ip.t_Dataload UNION ALL SELECT * FROM ip.t_Dataload_his ORDER BY Started DESC";
using (SqlDataAdapter oDataAdapter = new SqlDataAdapter(oCommand))
{
oDataAdapter.Fill(oDataSet);
radGridView1.DataSource = oDataSet.Tables[0];
}
}
}
}
Form.designer.cs:
//
// radGridView1
//
this.radGridView1.BackColor = System.Drawing.SystemColors.Desktop;
this.radGridView1.CausesValidation = false;
this.radGridView1.Cursor = System.Windows.Forms.Cursors.Default;
this.radGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.radGridView1.EnableCustomFiltering = true;
this.radGridView1.Font = new System.Drawing.Font("Segoe UI", 8.25F);
this.radGridView1.ForeColor = System.Drawing.SystemColors.ControlText;
this.radGridView1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.radGridView1.Location = new System.Drawing.Point(0, 24);
//
// radGridView1
//
this.radGridView1.MasterTemplate.AllowAddNewRow = false;
this.radGridView1.MasterTemplate.AllowDeleteRow = false;
this.radGridView1.MasterTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
this.radGridView1.MasterTemplate.EnableCustomFiltering = true;
this.radGridView1.MasterTemplate.EnableFiltering = true;
this.radGridView1.MasterTemplate.SelectionMode = Telerik.WinControls.UI.GridViewSelectionMode.CellSelect;
this.radGridView1.Name = "radGridView1";
this.radGridView1.NewRowEnterKeyMode = Telerik.WinControls.UI.RadGridViewNewRowEnterKeyMode.None;
this.radGridView1.ReadOnly = true;
this.radGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.radGridView1.ShowGroupPanel = false;
this.radGridView1.Size = new System.Drawing.Size(1277, 746);
this.radGridView1.TabIndex = 2;
this.radGridView1.Text = "radGridView1";
this.radGridView1.EnableFiltering = true;
this.radGridView1.RowFormatting += new Telerik.WinControls.UI.RowFormattingEventHandler(this.radGridView1_RowFormatting);
this.radGridView1.CellFormatting += new Telerik.WinControls.UI.CellFormattingEventHandler(this.radGridView1_CellFormatting);
this.radGridView1.CellDoubleClick += new Telerik.WinControls.UI.GridViewCellEventHandler(this.radGridView1_CellDoubleClick);
this.radGridView1.DataBindingComplete += new Telerik.WinControls.UI.GridViewBindingCompleteEventHandler(this.radGridView1_DataBindingComplete);
this.radGridView1.FilterExpressionChanged += new Telerik.WinControls.UI.GridViewFilterExpressionChangedEventHandler(this.radGridView1_FilterExpressionChanged);
//
If you set
EnableCustomFiltering = true
and
EnableFiltering = true
filtering does not work.
To make the filtering work, set EnableCustomFiltering = false and EnableFiltering = true.