[Gambas-user] frm2form 0.01

Rob sourceforge-raindog2 at ...94...
Mon Jul 21 18:09:34 CEST 2003


On Monday 21 July 2003 11:07, Nelson Ferraz wrote:
> I'm removing everything between BeginProperty and EndProperty, since I'm
> not sure how Gambas would treat it:

I'm not sure whether it'll be possible to translate fonts from vb to gb, but 
if we can, we'll have to parse those blocks out eventually.  Don't know what 
else falls between them.

> Here's the latest version of the script. I've managed to convert a
> relativelly complex form (attached), but I had to replace a scroll bar
> with a button.

Actually, if you make sure the gambas project you're bringing it into has the 
gb.qt.ext component, you can convert both HScrollBars and VScrollBars into 
Gambas ScrollBars (Gambas tells the difference by the height and width of the 
scrollbar, rather than having two separate controls.)  Here's a modified 
version of the perl script and the resulting Gambas output, which Works For 
Me(tm) ;)

I also changed <STDIN> back to <>.  Hope you don't mind, but I really like 
<>'s ability to take filenames as parameters on the command line rather than 
having to do perl vb2gb.pl <filename.frm ;)

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vb2gb.pl
Type: text/x-perl
Size: 1862 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20030721/c1c1b21e/attachment.pl>
-------------- next part --------------
# Gambas Form File 1.0
{ Form8  Form
   Height    =   452
   Left      =   4
   Top       =   23
   Width     =   510
   { Frame1  Frame
      BackColor       =   &H00FF0000&
      Height          =   451
      Left            =   0
      Top             =   0
      Width           =   509
      { Frame2  Frame
         Height          =   326
         Left            =   8
         Top             =   116
         Width           =   492
         { Frame3  Frame
            Text         =   ("Attendance Roster")
            Height          =   209
            Left            =   8
            Top             =   108
            Width           =   476
            { VScroll1  ScrollBar
               Height          =   201
               Left            =   458
               Top             =   8
               Width           =   17
            }
         }
         { Text1  TextBox
            Height          =   19
            Left            =   216
            Text            =   ("MM/DD/YYYY")
            Top             =   75
            Width           =   84
         }
         { Combo1  ComboBox
            Height          =   21
            Left            =   91
            Text            =   ("CMPS 374")
            Top             =   41
            Width           =   117
         }
         { Text2  TextBox
            Height          =   19
            Left            =   91
            Text            =   ("MM/DD/YYYY")
            Top             =   75
            Width           =   84
         }
         { Button2  Button
            Text         =   ("Get Attendance")
            Height          =   26
            Left            =   341
            Top             =   25
            Width           =   101
         }
         { Button3  Button
            Text         =   ("Clear Form")
            Height          =   26
            Left            =   341
            Top             =   75
            Width           =   101
         }
         { TextLabel6  TextLabel
            Text         =   ("To")
            Height          =   17
            Left            =   166
            Top             =   75
            Width           =   51
         }
         { TextLabel3  TextLabel
            Text         =   ("Class:")
            Height          =   17
            Left            =   8
            Top             =   41
            Width           =   92
         }
         { TextLabel4  TextLabel
            Text         =   ("Date Range:")
            Height          =   17
            Left            =   8
            Top             =   75
            Width           =   92
         }
      }
      { TextLabel2  TextLabel
         Text         =   ("Security Level:  Faculty")
         
         ForeColor       =   &H000000FF&
         Height          =   17
         Left            =   50
         Top             =   91
         Width           =   367
      }
      { TextLabel1  TextLabel
         Text         =   ("Student Communicator and Tracker Attendance Menu")
         
         Height          =   84
         Left            =   33
         Top             =   8
         Width           =   417
      }
   }
}


More information about the User mailing list