Re: [fltk.general] how to select one line after browser widgetcreate

2012-04-25 Thread leowang
> On 04/25/12 07:10, leowang wrote: > >>> I found that after the browser widget created, it is focused in the first > >>> line, but the first line does not highlight, how to set it to highlight, I > >>> tryed select(0, true), but has no effect. > >> > >> You might find that browser lines are number

Re: [fltk.general] callback with lambda expression

2012-04-25 Thread testalucida
thank you. Unfortunately vc10 is the one and only enterprise-wide used compiler so I really have no chance to use gcc at work. So I'll follow your advice and try it like 1999 ;) > > On 25.04.2012, at 18:18, testalucida wrote: > > > Hi, > >=20 > > this code: > >=20 > > Fl_Button *pBtn =3D new Fl_B

Re: [fltk.general] callback with lambda expression

2012-04-25 Thread Matthias Melcher
On 25.04.2012, at 18:18, testalucida wrote: > Hi, > > this code: > > Fl_Button *pBtn = new Fl_Button(...); > pBtn->callback( [](Fl_Widget *w, void *u ) {printf(...);} ); > > compiles fine with gcc but won't with vc10. > Error message says something like "can't convert lambda to Fl_Callback*".

Re: [fltk.general] how to deactivate one line in browserwidgetin fltk1.3

2012-04-25 Thread Matthias Melcher
On 25.04.2012, at 15:52, MacArthur, Ian (SELEX GALILEO, UK) wrote: >> I use the browser widget to display files, and the files are sorted by >> name, it looks like follows: >> >> a >> a.txt >> ab.txt >> b.txt >> c >> ch.txt >> >> so the lines which has index character should not be focused. >>

Re: [fltk.general] how to select one line after browser widgetcreate

2012-04-25 Thread Greg Ercolano
On 04/25/12 07:10, leowang wrote: >>> I found that after the browser widget created, it is focused in the first >>> line, but the first line does not highlight, how to set it to highlight, I >>> tryed select(0, true), but has no effect. >> >> You might find that browser lines are numbered from 1, n

[fltk.general] callback with lambda expression

2012-04-25 Thread testalucida
Hi, this code: Fl_Button *pBtn = new Fl_Button(...); pBtn->callback( [](Fl_Widget *w, void *u ) {printf(...);} ); compiles fine with gcc but won't with vc10. Error message says something like "can't convert lambda to Fl_Callback*". Does anybody know the reason? Is there a way to use lambdas wit

Re: [fltk.general] how to select one line after browser widgetcreate

2012-04-25 Thread leowang
> > > I found that after the browser widget created, it is focused in the first > > line, but the first line does not highlight, how to set it to highlight, I > > tryed select(0, true), but has no effect. > > = > > > Then is there some other API to make one line highlight after browser > > widget c

Re: [fltk.general] how to select one line after browser widget create

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> I found that after the browser widget created, it is focused in the first > line, but the first line does not highlight, how to set it to highlight, I > tryed select(0, true), but has no effect. > > Then is there some other API to make one line highlight after browser > widget create. You migh

Re: [fltk.general] how to deactivate one line in browserwidgetin fltk1.3

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> I use the browser widget to display files, and the files are sorted by > name, it looks like follows: > > a > a.txt > ab.txt > b.txt > c > ch.txt > > so the lines which has index character should not be focused. > Now I have implement this function by modify Fl_Browser.cxx and > Fl_Browser_.cxx

[fltk.general] how to select one line after browser widget create

2012-04-25 Thread leowang
Dear All, I found that after the browser widget created, it is focused in the first line, but the first line does not highlight, how to set it to highlight, I tryed select(0, true), but has no effect. Then is there some other API to make one line highlight after browser widget create. Best reg

Re: [fltk.general] how to deactivate one line in browserwidgetin fltk1.3

2012-04-25 Thread leowang
> > > > I have a browser widget in a window, there has some lines in this > > browser, > > > > press up/down key can select one by one, how can I set one line(or > > item) > > > > deactivate, then the focus will not move to this line. > > > > > > Sorry, I'm not understanding your question clearly e

Re: [fltk.general] how to deactivate one line in browser widgetin fltk1.3

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> > > I have a browser widget in a window, there has some lines in this > browser, > > > press up/down key can select one by one, how can I set one line(or > item) > > > deactivate, then the focus will not move to this line. > > > > Sorry, I'm not understanding your question clearly enough to formu

Re: [fltk.general] how to deactivate one line in browser widgetin fltk1.3

2012-04-25 Thread leowang
> > > I have a browser widget in a window, there has some lines in this browser, > > press up/down key can select one by one, how can I set one line(or item) > > deactivate, then the focus will not move to this line. > > Sorry, I'm not understanding your question clearly enough to formulate an a= >

Re: [fltk.general] how to deactivate one line in browser widget in fltk1.3

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> I have a browser widget in a window, there has some lines in this browser, > press up/down key can select one by one, how can I set one line(or item) > deactivate, then the focus will not move to this line. Sorry, I'm not understanding your question clearly enough to formulate an answer - can

[fltk.general] how to deactivate one line in browser widget in fltk1.3

2012-04-25 Thread leowang
Dear All, I have a browser widget in a window, there has some lines in this browser, press up/down key can select one by one, how can I set one line(or item) deactivate, then the focus will not move to this line. Best regards, Leo ___ fltk mailing list

Re: [fltk.general] how to set font in fltk1.3

2012-04-25 Thread leowang
> > > I have a question of how to set my custom font, for example, I have a font > > named MY_FONT, then how can I use this font type to display the text in > > Browser widget? > > = > > > I see it has a fl_font API, but the first parameter is a int type, so I > > don't know how to set my font for

Re: [fltk.general] how to set font in fltk1.3

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> I have a question of how to set my custom font, for example, I have a font > named MY_FONT, then how can I use this font type to display the text in > Browser widget? > > I see it has a fl_font API, but the first parameter is a int type, so I > don't know how to set my font for Browser widget.

Re: [fltk.general] how to change text color when select the text in fltk1.3

2012-04-25 Thread MacArthur, Ian (SELEX GALILEO, UK)
> In fltk2.0, it has a API called selection_textcolor(int color), this can > change text color if the text is select. > > But in fltk1.3, I can't find the similar API, can anyone else tell me > where is this API, thanks. Which widget are you asking about? I'm not sure if this is an API that flt