| [ scroll ] / 
                                               Makaleler-Article(s) 
 scroll ile ilgili toplam 5 makale bulundu ! (A total of 5 article(s) about scroll was(were) found in all of articles!)
 
 
 | Article | 
|---|
 | GridView a Scroll Ekleme ve Seçili Satır Bilgilerini Label de GöstermekMerhaba arkadaşlar bu makalemizde GridView a script ile scroll ekleyeceğiz. Dikey eklediğimiz Scroll ile GridView da aşağı yukarı satırlar arasında hızlı gidebileceğiz. Ayrıca GridView da Select linkine tıklayıp satırı seçeceğiz.
 |  | GridView Nesnesinde Kaydırılabilir ScrollBar Çubuğu Ekleme Merhaba arkadaşlar bu makalemizde  GridView  nesnesine kaydırma çubuğu scrollbar nasıl eklenir onu göstereceğim. GridView nesnesinde kaydırma çubuğu için CSS class ını kullanacağız.
 |  | Panelde Resimin ScrollBarlı Olarak GösterimiPanelde resim yatay ve dikey scrollbar lı şekilde gösterimini sağlayacağız. Şekil 1 i inceleyiniz.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        Panel panel1 = new System.Windows.Forms.Panel();
        public Form1()
        {
            InitializeComponent();
            
            this.SuspendLayout();
            panel1.AutoScroll = true;
            panel1.BackgroundImage = new Bitmap("C:\\pic1.bmp");
            panel1.Location = new System.Drawing.Point(13, 13);
            panel1.Size = new System.Drawing.Size(267, 243);
            AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            ClientSize = new System.Drawing.Size(292, 268);
            Controls.Add(panel1);
            this.Load += new System.EventHandler(this.Form1_Load);
            this.ResumeLayout(false); panel1.AutoScrollMinSize = panel1.BackgroundImage.Size;
        }
        private void Form1_Load(object sender, EventArgs e)
        {
           
            int midX = panel1.AutoScrollMinSize.Width / 2;
            int midY = panel1.AutoScrollMinSize.Height / 2;
            int halfSizeX = panel1.Size.Width / 2;
            int halfSizeY = panel1.Size.Height / 2;
            int startPosX = midX - halfSizeX;
            if (startPosX < 0) startPosX = 0;
            int startPosY = midY - halfSizeY;
            if (startPosY < 0) startPosY = 0;
            panel1.AutoScrollPosition = new Point(startPosX, startPosY);
        }
    }
}
//Bir sonraki makalede görüşmek üzere. Bahadır ŞAHİN
 |  | VScrollBar, HScrollBar Kullanarak Form Boyutunu DeğiştirmeBu örneğimizde VScrollBar, HScrollBar kullanarak formumuzun yatay ve dikey 
boyutlarını değiştireceğiz. Aşağıdaki
şekilleri incdeleyin.
private void Form1_Load(object sender, EventArgs e)
        {
            hScrollBar1.Minimum = 300;
            hScrollBar1.Maximum = 1000;
            hScrollBar1.SmallChange = 1;
            hScrollBar1.LargeChange = 50;
            vScrollBar1.Minimum = 300;
            vScrollBar1.Maximum = 1000;
            vScrollBar1.SmallChange = 1;
            vScrollBar1.LargeChange = 50;
            this.Text = "Boyut(" + this.Width + "," + this.Height + ")";
        }
        private void hScrollBar1_Scroll(object sender, ScrollEventArgs e)
        {
            this.Width = Convert.ToInt32(hScrollBar1.Value);
            this.Text = "Boyut(" + Convert.ToInt32(hScrollBar1.Value) + "," + Convert.ToInt32(vScrollBar1.Value) +")";
            
            }
        private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
        {
            this.Height = Convert.ToInt32(vScrollBar1.Value);
            this.Text = "Boyut(" + Convert.ToInt32(hScrollBar1.Value) + "," + Convert.ToInt32(vScrollBar1.Value) + ")";
        }
//Bir sonraki makalede buluşmak üzere. Bahadır
 |  | vScrollBar ile Renk YönetimiVScrollBar nesnesini kullanarak formumuzun arkaplan rengini değiştireceğiz.
İlk önce formunuza 3 adet vScrollBar nesnesi ekleyin. Aşağıdaki şekilleri inceleyin.
Önemli Not:formunuzun  InitializeComponent(); kısmına
this.vScrollBar1.ValueChanged += new System.EventHandler(this.vScrollBar1_ValueChanged);  
this.vScrollBar2.ValueChanged += new System.EventHandler(this.vScrollBar2_ValueChanged); 
this.vScrollBar3.ValueChanged += new System.EventHandler(this.vScrollBar3_ValueChanged);  
kodlarını eklemeyi unutmayın...Bahadır
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        this.vScrollBar1.ValueChanged += new System.EventHandler(this.vScrollBar1_ValueChanged);  
        this.vScrollBar2.ValueChanged += new System.EventHandler(this.vScrollBar2_ValueChanged); 
        this.vScrollBar3.ValueChanged += new System.EventHandler(this.vScrollBar3_ValueChanged);  
        
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            label1.Text = "Değer1: 0";
            label2.Text = "Değer2: 0";
            label3.Text = "Değer3: 0";
            this.Text = "vScrollBar Renk Yönetimi";
            this.MaximizeBox = false;
        }
        private static int kırmızı = 0;
        private static int mavi = 0;
        private static int yeşil = 0;  
        private void vScrollBar1_ValueChanged(object sender, System.EventArgs e)
        {
            this.label1.Text = String.Format("Değer1: {0}", vScrollBar1.Value);
           
            kırmızı = this.vScrollBar1.Value;
            this.BackColor = Color.FromArgb(kırmızı,yeşil,mavi);
            //veya
            //this.BackColor = Color.FromArgb(vScrollBar1.Value, vScrollBar2.Value, vScrollBar3.Value);
            //seklinde gösterebilirsiniz.
        }
        private void vScrollBar2_ValueChanged(object sender, System.EventArgs e)
        {
            this.label2.Text = String.Format("Değer2: {0}", vScrollBar2.Value);
            yeşil = this.vScrollBar2.Value;
            this.BackColor = Color.FromArgb(kırmızı, yeşil, mavi);
            //veya
            //this.BackColor = Color.FromArgb(vScrollBar1.Value, vScrollBar2.Value, vScrollBar3.Value);
            //seklinde gösterebilirsiniz.
        }
        private void vScrollBar3_ValueChanged(object sender, System.EventArgs e)
        {
            this.label3.Text = String.Format("Değer3: {0}", vScrollBar3.Value);
            mavi = this.vScrollBar3.Value;
            this.BackColor = Color.FromArgb(kırmızı, yeşil, mavi);
            //veya
            //this.BackColor = Color.FromArgb(vScrollBar1.Value, vScrollBar2.Value, vScrollBar3.Value);
            //seklinde gösterebilirsiniz.
        }
       
    }
}
//Bir sonraki makalede görüşmek üzere.   Bahadır
 | 
 
 |