ALCY (Beginner )> Auto Indentation/ Default font / Tab Pannel / Date functions

MisterX b.xavier at internet.lu
Mon Oct 10 11:16:53 EDT 2005


Hi Alcy
> 
> Hi all,
> I am still a beginner and have a series of questions:
> 1- How can I stop the automatic indentation of the code?  I 
> find it rather cahotic and I would rather take care of it 
> myself, I personally prefer no identation but I use a certain 
> amount of # characters to mark the blocks such as  if/end if...
> eg:
> # Do this for now ###
> if ..
> done here
> end if
> ###
> This method is much clearer for me and keeps the maximum 
> length available for the code and practically, it saves a lot 
> of time..

go to preferences and click on script editor and then on the 
auto-format button.

> 2- How can I set the default size of the text and font of new 
> buttons? 
> Looks like the default settings of my preferences is not 
> taken into account for new buttons Text/size properties. At 
> the moment I copy and paste existing buttons but there must 
> be some default settings I have missed somewhere right?

I was going to tell that to Rev about a year ago but nobody seemed to listen
so im working on it on my own... I don't know if others have done the
same...

My method is not finished though...

Although, there is a simple method... just create your buttons and set the
stack's font properties to the default you want... It's that simple...

> 3- Tab pannel: How does it work? At the moment when I click 
> on a tab of the "Tab pannel" it shows as selected, however 
> what is the property recording the tab which has been 
> clicked? (the label stays empty) Also it looks like it 
> doesn't handle the navigation in long lists, has someone done 
> a routine to navigate in a list of menus and display the list 
> in a tab pannel?

Tabs work like menus. You put the lines you want into it's content (put the
menulinestext into btn "tabmenu". 

use a menupick handler to detect what was selected. You'll find plenty of
examples on revonline. 

The basic script goes like this:

on menupick newitem, olditem
  go card newitem
  or -- my prefered
  hide group olditem
  show group newitem
end menupick

one example of multiple tabs is in my discretebrowser stack - in the source
tab item, you have another tab to see different sources. In the options tab
item, you have an index field version of the same tab menu.

Here's the last entry about it which is not the latest...
http://monsieurx.com/modules.php?name=News&file=article&sid=139
The stack was changed significantly for the XOS framework which I work on.
But the tabs will work great.

cheers
Xavier

cheers
Xavier




More information about the use-livecode mailing list