News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Keep tabs from resizing
Author Message
jpjacobs
Member
***


Posts: 113
Group: Registered
Joined: Jul 2007
Status: Offline
Reputation: 0
Post: #1
Keep tabs from resizing

Hi!
I wrote a little ui, but i'm stuck with a problem.
I have a bunch of tabs in a group that is resizable, but i can't stop the tabs and buttons from resizing...
the code is:

Code:
--!/usr/local/bin/murgaLua
-- Tabber: A little scripty thing, to keep track of found tabs, search them, rate them, compress them, autoscroll, print them...
function tabber_exit()
  local confirm=fltk.fl_choice("sure you want to quit?","stay","quit",NULL)
    if confirm == 1 then os.exit(0) else tabber:show() end
end

tabber = fltk:Fl_Double_Window(510, 410)
    tabber:callback(tabber_exit)

menubar = fltk:Fl_Menu_Bar(0, 0, 510, 25)

do tabsGroup = fltk:Fl_Group(10,50,490,350)
        tabber:resizable(tabsGroup)
        tabs  = fltk:Fl_Tabs(5, 25, 500, 380)
            do local editorTab = fltk:Fl_Group(10, 50, 490, 350, "Editor")
                textbuffer = fltk.Fl_Text_Buffer()
                textEditor = fltk:Fl_Text_Editor(10, 55, 485, 315)
                    textEditor:buffer(textbuffer)
                    textEditor:textfont(fltk.FL_COURIER);
                    textEditor:textsize(10);
                editButton = fltk:Fl_Light_Button(335, 375, 50, 25, "Edit")
                    editButton:selection_color(Fl_Color1)
                newButton = fltk:Fl_Button(390, 375, 50, 25, "New")
                saveButton = fltk:Fl_Button(445, 375, 50, 25, "Save")
                    saveButton:deactivate()
            fltk.Fl_End()
            end
            
            do local searchTab = fltk:Fl_Group(10, 50, 490, 350, "Search")
                 pattern = fltk:Fl_Input(90, 65, 400, 25, "Search for")
                 fieldChoice = fltk:Fl_Choice(90, 90, 400, 25, "for")
                        local choices = {"Artist","Title","Chord"}
                        for i = 1,table.getn(choices) do
                                fieldChoice:add(choices[i])
                        end
                        fieldChoice:value(0)
                 searchButton = fltk:Fl_Return_Button(415, 375, 85, 25, "Search!")
                 clearButton = fltk:Fl_Button(355, 375, 55, 25, "Clear")
                 helpButton = fltk:Fl_Button(295, 375, 55, 25, "Help")
                 exact = fltk:Fl_Check_Button(90, 115, 400, 25, "exact")
            
            fltk.Fl_End()
            end
            
            do local browseTab = fltk:Fl_Group(10, 50, 490, 350, "Browse")
            fltk.Fl_End()
            end
            fltk.Fl_End()   -- end of tabs
        fltk.Fl_End()       -- end of TabsGroup
end
Fl:scheme("gtk+")
tabber:show();
Fl:run();

-- vim:ft=murga


Thanks,

Jan-Pieter

03-31-2008 04:16 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Keep tabs from resizing - jpjacobs - 03-31-2008 04:16 AM
RE: Keep tabs from resizing - mikshaw - 03-31-2008, 12:26 PM
RE: Keep tabs from resizing - mikshaw - 04-01-2008, 05:25 AM
RE: Keep tabs from resizing - jpjacobs - 04-01-2008, 08:53 PM
RE: Keep tabs from resizing - mikshaw - 04-01-2008, 11:54 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: