Posted: Thu Jul 04, 2002 10:29 pm
Restored from previous forum. Originally posted by WolfgangS.
HI!
1. Problem ...
Normaly i use this NewPanel() procedure to open a new panel with a RichEditGadget in it.
The problem is, when i use the RichEditOptions(#RichEdit,$373777) command, i just can use NewPanel() one time. The second time and all times later the OpenRichEdit command gives me a 0 back.
But when i use the NewPanel() procedure WITHOUT the RichEditOptions(#RichEdit,$373777) command, all works fine.
Why ?!??!
2. Problem
I want to get a horizontal and vertical scrollbar (hide if not necessary). Why don't works this ?:
#ES_AUTOHSCROLL|#WS_VISIBLE|#ES_AUTOVSCROLL
Best regards ...
WolfgangS
Win2k PB3.2
#RichEdit=#ES_AUTOHSCROLL|#WS_VISIBLE|#ES_SAVESEL|#ES_AUTOVSCROLL
Structure PanelComplex
Number.l ; Nummerierung des PanelComplexes
PathAndName.s ; Pfad+Name
Frame3dGadgetID.l ; ID des Frame3dGadget
RichEditGadgetID.l ; ID des RichEditGadget
Saved.l ; Ob schon gespeichert wurde
EndStructure
Procedure UpdatePanels()
UseWindow(#MotherWindowID)
SelectElement(Panel(), GetGadgetState(#PanelGadgetID)); !!!!!!!!!!!!! Aktiviert das aktuelle Element - Bezug auf Panel
If GetGadgetState(#PanelGadgetID)=0
ActivateGadget(#WebGadgetID)
Else
UseRichEdit(Panel()\RichEditGadgetID)
ActivateRichEdit(Panel()\RichEditGadgetID) ; !!!!!!!!!!!!! Aktiviert das dazugehörige RichEditGadget
EndIf
EndProcedure
Procedure NewPanel() ; öffnet neues Panel
UseWindow(#MotherWindowID)
LastElement(Panel()) : AddElement(Panel()) : AmountPanel+1
Panel()\Number=AmountPanel ; Nummerierung des PanelComplexes
Panel()\PathAndName=#String_Untitled ; Pfad+Name
Panel()\Frame3dGadgetID=#Frame3dID+AmountPanel ; ID des Frame3dGadget
Panel()\RichEditGadgetID=#RichID+AmountPanel ; ID des RichEditGadget
Panel()\Saved=#TRUE ; Ob schon gespeichert wurde #TRUE = weil leer
AddGadgetItem(#PanelGadgetID, -1, #String_Untitled)
Frame3DGadget(Panel()\Frame3dGadgetID,0,0,WindowWidth()-#RightBorder_3d,WindowHeight()-#LowerBorder_3d,"Frame3dGadgetID="+Str(Panel()\Frame3dGadgetID)+" Liste:"+Str(ListIndex(Panel())),2)
SetGadgetState(#PanelGadgetID, CountGadgetItems(#PanelGadgetID)-1) ; aktiviert das aktuelle (letzte) Panel
If OpenRichEdit(GadgetID(Panel()\Frame3dGadgetID),Panel()\RichEditGadgetID,0,0,WindowWidth()-#RightBorder_Rich,WindowHeight()-#LowerBorder_Rich, Str(Panel()\RichEditGadgetID))=0
MessageRequester("Error","Open new Richgadget",0)
End
EndIf
ActivateRichEdit(Panel()\RichEditGadgetID)
UseRichEdit(Panel()\RichEditGadgetID)
RichEditBackgroundColor($373777)
RichEditTextColor($eeee00)
RichEditOptions(#RichEdit,$373777)
UpdatePanels()
EndProcedure
HI!
1. Problem ...
Normaly i use this NewPanel() procedure to open a new panel with a RichEditGadget in it.
The problem is, when i use the RichEditOptions(#RichEdit,$373777) command, i just can use NewPanel() one time. The second time and all times later the OpenRichEdit command gives me a 0 back.
But when i use the NewPanel() procedure WITHOUT the RichEditOptions(#RichEdit,$373777) command, all works fine.
Why ?!??!
2. Problem
I want to get a horizontal and vertical scrollbar (hide if not necessary). Why don't works this ?:
#ES_AUTOHSCROLL|#WS_VISIBLE|#ES_AUTOVSCROLL
Best regards ...
WolfgangS
Win2k PB3.2
#RichEdit=#ES_AUTOHSCROLL|#WS_VISIBLE|#ES_SAVESEL|#ES_AUTOVSCROLL
Structure PanelComplex
Number.l ; Nummerierung des PanelComplexes
PathAndName.s ; Pfad+Name
Frame3dGadgetID.l ; ID des Frame3dGadget
RichEditGadgetID.l ; ID des RichEditGadget
Saved.l ; Ob schon gespeichert wurde
EndStructure
Procedure UpdatePanels()
UseWindow(#MotherWindowID)
SelectElement(Panel(), GetGadgetState(#PanelGadgetID)); !!!!!!!!!!!!! Aktiviert das aktuelle Element - Bezug auf Panel
If GetGadgetState(#PanelGadgetID)=0
ActivateGadget(#WebGadgetID)
Else
UseRichEdit(Panel()\RichEditGadgetID)
ActivateRichEdit(Panel()\RichEditGadgetID) ; !!!!!!!!!!!!! Aktiviert das dazugehörige RichEditGadget
EndIf
EndProcedure
Procedure NewPanel() ; öffnet neues Panel
UseWindow(#MotherWindowID)
LastElement(Panel()) : AddElement(Panel()) : AmountPanel+1
Panel()\Number=AmountPanel ; Nummerierung des PanelComplexes
Panel()\PathAndName=#String_Untitled ; Pfad+Name
Panel()\Frame3dGadgetID=#Frame3dID+AmountPanel ; ID des Frame3dGadget
Panel()\RichEditGadgetID=#RichID+AmountPanel ; ID des RichEditGadget
Panel()\Saved=#TRUE ; Ob schon gespeichert wurde #TRUE = weil leer
AddGadgetItem(#PanelGadgetID, -1, #String_Untitled)
Frame3DGadget(Panel()\Frame3dGadgetID,0,0,WindowWidth()-#RightBorder_3d,WindowHeight()-#LowerBorder_3d,"Frame3dGadgetID="+Str(Panel()\Frame3dGadgetID)+" Liste:"+Str(ListIndex(Panel())),2)
SetGadgetState(#PanelGadgetID, CountGadgetItems(#PanelGadgetID)-1) ; aktiviert das aktuelle (letzte) Panel
If OpenRichEdit(GadgetID(Panel()\Frame3dGadgetID),Panel()\RichEditGadgetID,0,0,WindowWidth()-#RightBorder_Rich,WindowHeight()-#LowerBorder_Rich, Str(Panel()\RichEditGadgetID))=0
MessageRequester("Error","Open new Richgadget",0)
End
EndIf
ActivateRichEdit(Panel()\RichEditGadgetID)
UseRichEdit(Panel()\RichEditGadgetID)
RichEditBackgroundColor($373777)
RichEditTextColor($eeee00)
RichEditOptions(#RichEdit,$373777)
UpdatePanels()
EndProcedure