1. RE: problem changing font
- Posted by Ron Austin <ronaustin at alltel.net> Jan 02, 2004
- 418 views
Pete Lomax wrote: > > > On Fri, 2 Jan 2004 15:35:15 +0000, Ron Austin <ronaustin at alltel.net> > wrote: > > >procedure print_it( integer self, integer event, sequence params) > >setFont(win,"Roman",18,1) > >sequence name > > Within a procedure or routine definition, variable declarations must > occur before any code, so just swap the last two lines above and it > should be fine. > > Pete > Thanks for the help. Now maybe you can tell me why this don't work --------------------------------------------------------------------- -- INITIALIZE PROGRAM --------------------------------------------------------------------- procedure Activate_MainWin(integer self, integer event, sequence parms) setFont(Win,"Roman",18,1) hFile = trm_Open(fio, 1) GetStatus() setFocus(Data[2]) buffer = "" eof = 0 end procedure setHandler(Win, w32HActivate, routine_id("Activate_MainWin")) As you can see this is a procedure that is ran when the window is activated. Window "Win" has 6 Tab controls. on Tab1 there are 34 LText Lables, 30 SleText controls and 4 Combo conrols. I have discovered that I can change the font size of an individual control, but is there a way to change the size of all the controls by using one statement?
2. RE: problem changing font
- Posted by Tommy Carlier <tommy.carlier at pandora.be> Jan 02, 2004
- 386 views
Ron Austin wrote: > Thanks for the help. Now maybe you can tell me why this don't work > --------------------------------------------------------------------- > -- INITIALIZE PROGRAM > --------------------------------------------------------------------- > procedure Activate_MainWin(integer self, integer event, sequence parms) > setFont(Win,"Roman",18,1) > hFile = trm_Open(fio, 1) > GetStatus() > setFocus(Data[2]) > buffer = "" > eof = 0 > end procedure > setHandler(Win, w32HActivate, routine_id("Activate_MainWin")) > > As you can see this is a procedure that is ran when the window is > activated. Window "Win" has 6 Tab controls. on Tab1 there are 34 LText > > Lables, 30 SleText controls and 4 Combo conrols. I have discovered that > > I can change the font size of an individual control, but is there a way > to change the size of all the controls by using one statement? > Instead of setFont(Win, "Roman", 18, 1), you can pass more than 1 control in a sequence, like this: setFont({Win, Tab1, Tab2, LText1}, "Roman", 18, 1) ______________ tommy online: http://users.pandora.be/tommycarlier
3. RE: problem changing font
- Posted by Tommy Carlier <tommy.carlier at pandora.be> Jan 02, 2004
- 384 views
Tommy Carlier wrote: > Ron Austin wrote: > > Thanks for the help. Now maybe you can tell me why this don't work > > --------------------------------------------------------------------- > > -- INITIALIZE PROGRAM > > --------------------------------------------------------------------- > > procedure Activate_MainWin(integer self, integer event, sequence parms) > > setFont(Win,"Roman",18,1) > > hFile = trm_Open(fio, 1) > > GetStatus() > > setFocus(Data[2]) > > buffer = "" > > eof = 0 > > end procedure > > setHandler(Win, w32HActivate, routine_id("Activate_MainWin")) > > > > As you can see this is a procedure that is ran when the window is > > activated. Window "Win" has 6 Tab controls. on Tab1 there are 34 LText > > > > > > Lables, 30 SleText controls and 4 Combo conrols. I have discovered that > > > > > > I can change the font size of an individual control, but is there a way > > to change the size of all the controls by using one statement? > > > Instead of setFont(Win, "Roman", 18, 1), you can pass more than 1 > control in a sequence, like this: setFont({Win, Tab1, Tab2, LText1}, > "Roman", 18, 1) I just found an easier way: BEFORE you create the controls, call the setCreateFont-function: sequence oldFont oldFont = setCreateFont(faceName, points, attrib, color) fldA = create(Editbox, ... fldB = create(Editbox, ... VOID = setCreateFont(oldFont[1], oldFont[2], oldFont[3], oldFont[4]) ______________ tommy online: http://users.pandora.be/tommycarlier