Matt ha scritto:
I have tnotebook control on my preferences windows for my little program winff. I want page2 to show on windows and page3 on linux. I tried a number of different things. The code works on windows, but not on linux. I have tried a couple different ways, and tried compiling for gtk1.2 and 2.0.x, but there is no difference. It's strange because the notebook page shows up and the edit boxes show up but not the labels for the edit boxes. If i show both pages on linux the labels show up just fine. It must be how the labels are attached to the notebook page, so i deleted them and remade them, but still no difference.

here is the code:

procedure TForm4.FormCreate(Sender: TObject);

begin
 {$ifdef win32}
  page3.tabVisible:=false;
  edit2.Text:= form1.getconfigvalue('win32/ffmpeg');
  edit3.Text:= form1.getconfigvalue('win32/ffplay');
 {$endif}
 {$ifdef unix}
  page2.tabvisible:=false;
  edit4.Text:= form1.getconfigvalue('unix/ffmpeg');
  edit5.Text:= form1.getconfigvalue('unix/ffplay');
  edit6.Text:= form1.getconfigvalue('unix/terminal');
  edit7.Text:= form1.getconfigvalue('unix/termoptions');
 {$endif}

 edit1.Text:= form1.getconfigvalue('general/destfolder');


 if form1.getconfigvalue('general/rememberlast') = 'true' then
    checkbox1.Checked := true
 else
    checkbox1.Checked := false;

 if form1.getconfigvalue('general/pause') = 'true' then
    checkbox2.Checked := true
 else
    checkbox2.Checked := false;

 if form1.getconfigvalue('general/multithreading') = 'true' then
    checkbox3.Checked := true
 else
    checkbox3.Checked := false;
end;
I've met similar problems with notebook pages. In my case the solution has been to force a repaint of the active page with a Notebook.PageName.Invalidate both on the OnEnter event handler and OnPageChanged event handler.
I hope that it helps.

Giuliano

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to