Re: [Gambas-user] 'FontChooser.SelectedFont' is not static
Brought to you by:
gambas
|
From: Fabien B. <gam...@gm...> - 2014-11-28 14:18:08
|
Hum try that ... Public Sub FontBox1_Click() If Last.Value then TextArea1.Font = Font[Last.Value] End This is for the fontbox The font chooser is a complete control set to make dialog or area to choose font. 2014-11-28 14:57 GMT+01:00 Jussi Lahtinen <jus...@gm...>: > No that is FontBox, not FontChooser. > > > Jussi > > On Fri, Nov 28, 2014 at 3:42 PM, Lewis Balentine <le...@ke...> wrote: > >> >> Use IDE to put the FontChooser on your form << >> That is what I did. Then in the IDE I double-clicked on the control. >> That is what produced the sub declaration that I tried to use below. >> >> [System] >> Gambas=3.6.2 >> OperatingSystem=Linux >> Kernel=3.13.0-24-generic >> Architecture=x86_64 >> Distribution=Linux Mint 17 Qiana >> Desktop=MATE >> Theme=QGtk >> Language=en_US.UTF-8 >> Memory=15994M >> >> [Libraries] >> Cairo=libcairo.so.2.11301.0 >> Curl=libcurl.so.4.3.0 >> DBus=libdbus-1.so.3.7.6 >> GStreamer=libgstreamer-0.10.so.0.30.0 >> GStreamer=libgstreamer-1.0.so.0.204.0 >> GTK+3=libgtk-3.so.0.1000.8 >> GTK+=libgtk-x11-2.0.so.0.2400.23 >> OpenGL=libGL.so.1.2.0 >> Poppler=libpoppler.so.44.0.0 >> Qt4=libQtCore.so.4.8.6 >> SDL=libSDL-1.2.so.0.11.4 >> >> On 11/28/2014 07:23 AM, Jussi Lahtinen wrote: >> > Use IDE to put the FontChooser on your form, or instantiate it first >> (with >> > New command). >> > >> > >> > Jussi >> > >> > On Fri, Nov 28, 2014 at 2:24 PM, Lewis Balentine <le...@ke...> >> wrote: >> > >> >> Sorry to be a pest but I have run into another problem I can not seem to >> >> get past and I can find no examples. I am trying to use the FontChooser >> >> control (gb.form) in a very simple form. >> >> >> >> '--------------------------------------------- >> >> Public Sub FontBox1_Click() >> >> ' Dim S As String >> >> ' Dim S As String[] >> >> ' Dim S As New String[] >> >> ' Dim S as Font >> >> >> >> ' S = FontChooser.SelectedFont >> >> ' S = FontChooser.Font >> >> ' S = FontChooser.Name >> >> ' TextArea1.Font = FontChooser.SelectedFont >> >> ' TextArea1.Font = FontChooser.Font >> >> >> >> Print FontChooser.SelectedFont >> >> Stop >> >> End >> >> '--------------------------------------------- >> >> Everything that I try gives me an similar error: >> >> 'FontChooser.SelectedFont' is not static in Form 2:23. >> >> 'FontChooser.Font' is not static in Form 2:24. >> >> 'FontChooser.Name' is not static in Form 2:25. >> >> >> >> When I look at the wiki it states: >> >> Property SelectedFont As String >> >> Returns or sets the selected font as a string. >> >> >> >> Property Name As String >> >> Returns or sets the name of the control. >> >> >> >> Property Font As Font >> >> Returns or sets the font used to draw text in the control. >> >> >> >> I have run out of not so clever ideas. >> >> >> >> regards, >> >> >> >> Lewis >> >> >> >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> >> with Interactivity, Sharing, Native Excel Exports, App Integration & >> more >> >> Get technology previously reserved for billion-dollar corporations, FREE >> >> >> >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> >> _______________________________________________ >> >> Gambas-user mailing list >> >> Gam...@li... >> >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> > >> ------------------------------------------------------------------------------ >> > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> > from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> > with Interactivity, Sharing, Native Excel Exports, App Integration & more >> > Get technology previously reserved for billion-dollar corporations, FREE >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> > _______________________________________________ >> > Gambas-user mailing list >> > Gam...@li... >> > https://lists.sourceforge.net/lists/listinfo/gambas-user >> >> >> >> ------------------------------------------------------------------------------ >> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server >> from Actuate! Instantly Supercharge Your Business Reports and Dashboards >> with Interactivity, Sharing, Native Excel Exports, App Integration & more >> Get technology previously reserved for billion-dollar corporations, FREE >> >> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk >> _______________________________________________ >> Gambas-user mailing list >> Gam...@li... >> https://lists.sourceforge.net/lists/listinfo/gambas-user >> > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard |