Woods Posted June 7, 2014 Share Posted June 7, 2014 comboBoxtan bir değerin seçilmesini engellemek istiyorum mesela Edit Items'tan 'Seçiniz' diye bir alan ekledim ama bu sadece comboBox'ta yazıcak yani comboBoxı açtığımızda bu alanı seçemiyeceğiz bunu nasıl yapabilirim.Text olarak yazdım ama pek hoş olmadı Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 7, 2014 Share Posted June 7, 2014 direk bir yolunu göremedim ama şu yöntem iş görebilir: combobox'un SelectedIndexChanged evresine: if (comboBox1.SelectedIndex == 0) { comboBox1.SelectedIndex = 1; } yazarsan 0 nolu yani ilk itemi seçmeyecek, bir sonrakine atlayacaktır. şunun gibi görünmeli: Quote Link to comment Share on other sites More sharing options...
Woods Posted June 7, 2014 Author Share Posted June 7, 2014 Yardımın için teşekkürler üstad bu işlemden sonra yeni bir sorun çıktı ama onu düzelttim form açıldığında 0. indexin seçili olması gerekiyordu ama bu yazdığımız kod'tan sonra 1.indexi seçiyordu onuda şöyle düzelttim belki birinin işine yarar form1_Load comboBox7.SelectedText = "SEÇİNİZ"; Quote Link to comment Share on other sites More sharing options...
Rancho Posted June 7, 2014 Share Posted June 7, 2014 (edited) Text e yazarsanız bu şekilde görünür ve dediğiniz gibi oluyor seçilmiyor ancak yazıyor. Edited June 7, 2014 by Rancho Quote Link to comment Share on other sites More sharing options...
KintaRo Posted June 7, 2014 Share Posted June 7, 2014 bende yeni başladım visual c#'a, ilk defa birine yardım ediyorum :) takıldığın yerde sor hep beraber araştırır, öğrenir, çözeriz. Text e yazarsanız bu şekilde görünür ve dediğiniz gibi oluyor seçilmiyor ancak yazıyor. evet bu da mantıklı bir yol. ya da formu kaydeden, gönderen buttona koşul koyulabilir. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.