summaryrefslogtreecommitdiff
path: root/src/Fl_Search_Chooser.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2005-08-15 12:16:31 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2005-08-15 12:16:31 +0100
commit629ccf74c82978cf3dafa104fac26673fb234489 (patch)
tree3955dfd779ba8c330cd011b88fe632e5ee60fc03 /src/Fl_Search_Chooser.cxx
parentc07cca69bbd203eaff54da76b2fd89b460e71b06 (diff)
set focus on input of Fl_Search_Chooser
add label to input field
Diffstat (limited to 'src/Fl_Search_Chooser.cxx')
-rw-r--r--src/Fl_Search_Chooser.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Fl_Search_Chooser.cxx b/src/Fl_Search_Chooser.cxx
index bfcf7fb..bc77309 100644
--- a/src/Fl_Search_Chooser.cxx
+++ b/src/Fl_Search_Chooser.cxx
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <string.h>
+#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
#include "Fl_Search_Chooser.H"
@@ -86,13 +87,14 @@ Fl_Search_Chooser::Fl_Search_Chooser(const char *title) {
Fl_Group *g = new Fl_Group(10, 10, w->w() - 10, w->h() - 10);
sb = new Fl_Search_Browser(g->x(), g->y(), g->w() , g->h() - 100, NULL);
sb->type(FL_HOLD_BROWSER);
- Fl_Input *in = new Fl_Input(g->x(), g->h() - 80, g->w()-10, 20);
+ Fl_Input *in = new Fl_Input(g->x()+50, g->h()-80, g->w()-80, 20, "Search");
in->callback((Fl_Callback*) input_cb, this);
in->when(FL_WHEN_CHANGED);
Fl_Button *cancel_b = new Fl_Button(g->w()-200, g->h()-30, 80, 20, "Cancel");
cancel_b->callback((Fl_Callback*) cancel_cb, this);
Fl_Button *ok_b = new Fl_Button(g->w()-100, g->h()-30, 80, 20, "Ok");
ok_b->callback((Fl_Callback*) ok_cb, this);
+ Fl::focus(in);
g->end();
w->end();
}