thielj / MetroFramework

Metro UI of Windows 8 for .NET Windows Forms applications
http://thielj.github.io/MetroFramework
Other
396 stars 225 forks source link

combobox does not accepting text #44

Open zeeshan47 opened 9 years ago

bugriy commented 9 years ago

Same problem

paresh17 commented 9 years ago

Hello Bhavesh I think you have to edit MetroFrmework.Control.MetroCombobox Code. You have to change DropDownStyle Propery to 'DropDown' of Combobox Then bulid th project.

It will work Properly

paresh17 commented 9 years ago

Hi Bhavesh Are you using mdiParent form for you Application ?

paresh17 commented 9 years ago

Here i have some king of links to solve your proble. http://stackoverflow.com/questions/6468024/how-to-change-combobox-backgound-color-not-just-the-drop-down-list-part https://social.msdn.microsoft.com/Forums/en-US/d041df37-faae-4565-9beb-726470a65542/how-to-change-color-of-content-of-combo-box-in-vbnet?forum=vbgeneral

paresh17 commented 9 years ago

Actually i am also facing one problem regarding MDIParent form . if you have solution then suggest me . FrmTest.MDIParent =MdiForm dosent working.

paresh17 commented 9 years ago

this code is not working properly . Have you used mdiParent form in you project..

kyuki is chiz ne mere ko pgal karke rakha hai.

paresh17 commented 9 years ago

Yes i am from ahmedabad ...ok .. cool .. Anu UI kevu saru chhe?

paresh17 commented 9 years ago

hahaha ..Sachi vaat .. mare exeperince 2.5 year no chhe.

paresh17 commented 9 years ago

waaah good good..

Aa windows UI tari chhe ? https://github.com/bhaveshsorathiya1/winforms-modernui

paresh17 commented 9 years ago

Tu kaik buja frmaewrok nu keto hato a available chhe ?

paresh17 commented 9 years ago

same metro ki tarah dikhnewala code ki jo baat kar raha tha wo tu .. uska puchh raha hu

bhaveshsorathiya1 commented 9 years ago

private void comboBox1_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); Brush myBrush = Brushes.Black; Font ft = comboBox1.Font; e.Graphics.DrawString(comboBox1.Items[e.Index].ToString(), ft, myBrush, e.Bounds, StringFormat.GenericDefault); e.DrawFocusRectangle();

        e.DrawBackground();
        if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
        {
            e.Graphics.FillRectangle(Brushes.Red, e.Bounds);
            e.Graphics.DrawString(this.comboBox1.Items[e.Index].ToString(), this.comboBox1.Font, Brushes.White, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height));
        }
        else
        {
            e.Graphics.FillRectangle(Brushes.White, e.Bounds);
            e.Graphics.DrawString(this.comboBox1.Items[e.Index].ToString(), this.comboBox1.Font, Brushes.Black, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height));
        }
    }

1.aek panel ma combobox put karvu. pachi combobox nu dock=fill,border=flat and panel ni border style fixsingle set karvi.aetle combobox ni border thai jase.

paresh17 commented 9 years ago

ok .. got it. Ha patel chu...from Jamnagar

bhaveshsorathiya1 commented 9 years ago

ya good . i am patel from rajkot district.

paresh17 commented 8 years ago

Hi bhavesh how are you bro ? I am facing one problem so if you free then reply me on this post.i will explain my problem to you and get me out of this problem.

Thanks..

bhaveshsorathiya1 commented 8 years ago

Hey i am fine. & you. Jai Sardar. bol bhai bol.

paresh17 commented 8 years ago

Hi Jay Sradar bhai.

ComboBox ma Alt Key press karu tyare .. badhu items blue colors vadi thai jay chhe. Screenshot ma mukyu chhe em. Try to bov kari pan solve nathi thatu. Atle tari help ni jarur padi bhai. bugmf

bhaveshsorathiya1 commented 8 years ago

bhai aa drop down ma bhuj prob che.to tu aa sukam use kare che. ae aek success nathi thai me D.Mango sathe vat kari hati. aek to main problem tu search & sort nahi kari sake to matlab su aa drop down no. to me je code aapyo to te use kar to aekdam aavij rite dekhase. hu mari app ma aa drop down no use nathi karto. aa solve thase but var lagse. & hamna new update aavya che.to download kari leje.

paresh17 commented 8 years ago

ok bhai. To drop down mate biju kaik vicharvu padse.Baki ama to ghana problem chhe.Biju koi saru GUI mate avu open source hoy to keje.

Thanks ho bhai help mate. Jay Sardar

bhaveshsorathiya1 commented 8 years ago
             bhai aema thanks na hoy & hu tane dll send karish GUI ni koi sari hoy tevi.
             & kale java nu che GMDC Ground Ma.PATIDAR RALLY MA.
paresh17 commented 8 years ago

ok.bhai. Ha javanu j hoy ne bhai ..Apne nai jay to kon jase..Javu to pade j ne.

jdenieul commented 5 years ago

How did you solve your original problem ?

surrealistarealista commented 5 years ago

jdenieul, did you solve the problem of the combobox backcolor?

kirillVv commented 5 years ago

After changing changing the DropDownStyle in MetroFrmework.Control.MetroCombobox from DropDownList to DropDown the Combobox takes the values but u have to click several times on it to be able to write the text.

It is solved when u change base.DropDownStyle = ComboBoxStyle.DropDownList; to base.DropDownStyle = ComboBoxStyle.DropDown;

but the problem is that after doing it the Combobox appears black.

without text:

image

with text:

Безымянный

Can't figure out how to fix it. Has someone mby an idea?

Dr4inder commented 4 years ago

any news on this?

schiette commented 3 years ago

Any news? Was anyone able to fix this?