Thanks!rathinagiri wrote:This is my small contribution to the contrib.js (for grid column alignment)
<...>
Usage:
oGrid1.justify( [ 'right', 'left', 'center', 'justify', 'right' ] );
HMGSCRIPT 2012: Programming For The Web in The Right Way :)
Moderator: Rathinagiri
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
And...rathinagiri wrote:Usage:
oGrid1.justify( [ 'right', 'left', 'center', 'justify', 'right' ] );
Could be better, to be inline with the other methods, if you rename to setJustify.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Ok, Roberto. I will rename.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- luisfrancisco62
- Posts: 66
- Joined: Thu Mar 18, 2010 12:16 am
- Location: Colombia
- Contact:
- dhaine_adp
- Posts: 457
- Joined: Wed Aug 06, 2008 12:22 pm
- Location: Manila, Philippines
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Hi Roberto,
Thank you once again for leading HMG into another paradigm and setting a new standard together with HB. This one is truly very HMG. In short span of time a new library emerge as extension to HMG. I truly salute your programming abilities. Thanks for sharing the code with us here at HMG Forum.
Regards,
Danny
Thank you once again for leading HMG into another paradigm and setting a new standard together with HB. This one is truly very HMG. In short span of time a new library emerge as extension to HMG. I truly salute your programming abilities. Thanks for sharing the code with us here at HMG Forum.
Regards,
Danny
Regards,
Danny
Manila, Philippines
Danny
Manila, Philippines
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Thnaks for yor kind words.dhaine_adp wrote:Hi Roberto,
Thank you once again for leading HMG into another paradigm and setting a new standard together with HB. This one is truly very HMG. In short span of time a new library emerge as extension to HMG. I truly salute your programming abilities. Thanks for sharing the code with us here at HMG Forum.
Regards,
Danny
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
HMGSCRIPT R28
- new: CheckBox, getValue() and setValue() methods. They accepts and return a string
('Yes' and 'No').
- new: textBox. setFocus() method added.
- changed: Append and Modify functions (aValues array). The dates must be specified as ANSI strings now. Logical fields can be specified as boolean or string ('Yes' or 'No'). The numeric fields
can be specified as numbers or strings.
- changed: Initial value for Checkbox can be boolean or string ('Yes' or 'No').
- fixed: variables scope in library internals.
- changed: Browse demo. It features an append window now. Edit and append, supports all column tyoes now.
- changed: TextBox. setAutoFocus() method eliminated.
- Attachments
-
- hmgscript.r28.zip
- (1.43 MiB) Downloaded 355 times
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
That is nice!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Long Live Robertodhaine_adp wrote:
Hi Roberto,
Thank you once again for leading HMG into another paradigm and setting a new standard together with HB. This one is truly very HMG. In short span of time a new library emerge as extension to HMG. I truly salute your programming abilities. Thanks for sharing the code with us here at HMG Forum.
Regards,
Danny
BPD
Convert Dream into Reality through HMG
Convert Dream into Reality through HMG
Re: HMGSCRIPT 2012: Programming For The Web in The Right Way
Method setProperty for LABEL:
sample of use:
Possible properties:
col - column position of a Label
sample: oLabelx.setProperty("col",100);
row - row position of a Label
sample: oLabelx.setProperty("row",240);
fontname - font name of Label
sample: oLabelx.setProperty("fontname","Arial");
fontcolor - font color of Label
sample: oLabelx.setProperty("fontcolor","red");
fontsize - font size of Label
sample: oLabelx.setProperty("fontsize","18");
bold - font bold property
sample: oLabelx.setProperty("bold",true);
italic - font italic property
sample: oLabelx.setProperty("italic",true);
underline - font underline property
sample: oLabelx.setProperty("underline",true);
strikeout - font strikeout property
sample: oLabelx.setProperty("strikeout",true);
Code: Select all
//////////////////////////////////////////////////////////////////////////////////
// Label
//////////////////////////////////////////////////////////////////////////////////
function Label( oParent , nRow , nCol , cValue )
{
// Create the label on the fly, set its properties and append to the specified
// parent window
var cId = 'control' + (nControlCount).toString() ; nControlCount++ ;
var control = document.createElement( "span" );
control.className = "label" ;
control.style.top = nRow ;
control.style.left = nCol ;
control.innerHTML = cValue ;
control.id = cId ;
document.getElementById( oParent.getId() ).appendChild( control ) ;
this.getId = function ()
{
return cId;
}
this.setProperty = function ( cPropertyName, PropertyValue )
{
if ( cPropertyName.toLowerCase() == 'row' )
{
document.getElementById(cId).style.top = PropertyValue ;
}
else if ( cPropertyName.toLowerCase() == 'col' )
{
document.getElementById(cId).style.left = PropertyValue ;
}
else if ( cPropertyName.toLowerCase() == 'fontname' )
{
document.getElementById(cId).style.fontFamily = PropertyValue ;
}
else if ( cPropertyName.toLowerCase() == 'fontcolor' )
{
document.getElementById(cId).style.color = PropertyValue ;
}
else if ( cPropertyName.toLowerCase() == 'fontsize' )
{
document.getElementById(cId).style.fontSize = PropertyValue ;
}
else if ( cPropertyName.toLowerCase() == 'bold' )
{
if (PropertyValue)
{
document.getElementById(cId).style.fontWeight = 'bold' ;
}
else
{
document.getElementById(cId).style.fontWeight = 'normal' ;
}
}
else if ( cPropertyName.toLowerCase() == 'italic' )
{
if (PropertyValue)
{
document.getElementById(cId).style.fontStyle = 'italic' ;
}
else
{
document.getElementById(cId).style.fontStyle = 'normal' ;
}
}
else if ( cPropertyName.toLowerCase() == 'underline' )
{
if (PropertyValue)
{
document.getElementById(cId).style.textDecoration = 'underline' ;
}
else
{
document.getElementById(cId).style.textDecoration = 'none' ;
}
}
else if ( cPropertyName.toLowerCase() == 'strikeout' )
{
if (PropertyValue)
{
document.getElementById(cId).style.textDecoration = 'line-through' ;
}
else
{
document.getElementById(cId).style.textDecoration = 'none' ;
}
}
}
}
Code: Select all
oWin = new Form( "Label Demo", 600 , 300 );
oLabelx = new Label( oWin , 100 , 260 , "This is a Label!" );
oLabelx.setProperty("fontcolor","red");
oLabelx.setProperty("fontsize","20");
oLabelx.setProperty("col",100);
col - column position of a Label
sample: oLabelx.setProperty("col",100);
row - row position of a Label
sample: oLabelx.setProperty("row",240);
fontname - font name of Label
sample: oLabelx.setProperty("fontname","Arial");
fontcolor - font color of Label
sample: oLabelx.setProperty("fontcolor","red");
fontsize - font size of Label
sample: oLabelx.setProperty("fontsize","18");
bold - font bold property
sample: oLabelx.setProperty("bold",true);
italic - font italic property
sample: oLabelx.setProperty("italic",true);
underline - font underline property
sample: oLabelx.setProperty("underline",true);
strikeout - font strikeout property
sample: oLabelx.setProperty("strikeout",true);