Page 1 of 1

Is it possible to have an option list like this

Posted: Wed Nov 17, 2010 8:37 pm
by jesse
Is it possible to have a option list like in this image when clicked shows a browser with multiple columns? Its almost like a drop down list that
shows a datagrid i guess but im not sure how to make it happen in LiveCode.
tc.jpg
tc.jpg (40.11 KiB) Viewed 3877 times
Any tips on how to accomplish this?

Re: Is it possible to have an option list like this

Posted: Wed Nov 17, 2010 10:12 pm
by Zryip TheSlug
jesse wrote:Is it possible to have a option list like in this image when clicked shows a browser with multiple columns? Its almost like a drop down list that
shows a datagrid i guess but im not sure how to make it happen in LiveCode.
tc.jpg
Any tips on how to accomplish this?
Yes that is possible to use a datagrid as a browser and open it the way of your screen picture, of course! :)


For doing that and other kind of dialogs as well, you need to be more familiar with:

1) Stacks and substacks

2) The menuName property

3) How to open a stack:

Code: Select all

go to stack "MyWindow"
Note that you have synonym in LiveCode
go = open
stack = window
So you can have the syntax the more understandable for your need:

Code: Select all

open window "MyWindow"
4) The window types:
Modal, Palette, etc

5) The dialogData property

6) The dgHilitedLines property of a datagrid

7) How to close a stack (or window)
close

Read more about all of that in the doc, the dictionary and the lessons and come back to us if you have questions ;)


Regards

Re: Is it possible to have an option list like this

Posted: Thu Nov 18, 2010 2:55 am
by shaosean
Put the datagrid on a stack and use the popup command

Re: Is it possible to have an option list like this

Posted: Thu Nov 18, 2010 3:58 pm
by jesse
Ok guys I got a test going on it. just a simple show stack

Code: Select all

popup stack "Browser"
I have an option list with this code but it only shows the stack after I have selected an option. I want it to show as soon as I click or focus
on the field and the stack popup code is run. What command would I put the popup code in to make that happen?

Code: Select all

global gDateTimeStamp

on menuPick pItemName
   switch pItemName
      default
         put the date && the time into  gDateTimeStamp
         put gDateTimeStamp into field "Current Date Time Stamp"
         --Set the visible of stack "Browser" to True
         Set the disabled of button "StatusButton" to False
        popup stack "Browser"
   end switch     
      
end menuPick