Is it possible to have an option list like this

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Is it possible to have an option list like this

Post by jesse » Wed Nov 17, 2010 8:37 pm

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 3870 times
Any tips on how to accomplish this?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Zryip TheSlug
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 163
Joined: Tue Jan 26, 2010 10:15 pm
Contact:

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

Post by Zryip TheSlug » Wed Nov 17, 2010 10:12 pm

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
TheSlug
http://www.aslugontheroad.com - Tutorials, demo stacks and plugins for LiveCode
Data Grid Helper - An intuitive interface for building LiveCode's Data Grids
Excel Library- Extends the LiveCode language for controlling MS Excel

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

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

Post by shaosean » Thu Nov 18, 2010 2:55 am

Put the datagrid on a stack and use the popup command

jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

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

Post by jesse » Thu Nov 18, 2010 3:58 pm

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
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Post Reply