Anyone know how to change the colour of or remove the Scintilla Gadget Border (World's ugliest ever border )
Edit: I have slightly oversized it and set X and Y negative - looks much better.
Change colour or remove Scintilla Gadget Border
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Change colour or remove Scintilla Gadget Border
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Change colour or remove Scintilla Gadget Border
Code: Select all
Procedure Sci_SetBorder_(Gadget.i, State.i)
CompilerIf (#PB_Compiler_OS = #PB_OS_Windows)
If (State)
SetWindowLongPtr_(GadgetID(Gadget), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(Gadget), #GWL_EXSTYLE) | #WS_EX_CLIENTEDGE)
Else
SetWindowLongPtr_(GadgetID(Gadget), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(Gadget), #GWL_EXSTYLE) & ~#WS_EX_CLIENTEDGE)
EndIf
CompilerEndIf
EndProcedure
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Change colour or remove Scintilla Gadget Border
That's interesting Kenmo - what is the "state" var for?
Since I'm Windows only, I just added this after the gadget definition:
[/size]
..... but it has no effect? Windows 7 x64.
Since I'm Windows only, I just added this after the gadget definition:
Code: Select all
SetWindowLongPtr_(GadgetID(#Scnt), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(#Scnt), #GWL_EXSTYLE) | #WS_EX_CLIENTEDGE)
..... but it has no effect? Windows 7 x64.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: Change colour or remove Scintilla Gadget Border
Maybe "State" should be called "Enable" to be more clear
Call the procedure with State = #False to remove the default border.
So you picked the wrong line of the 2 to copy, try:
Call the procedure with State = #False to remove the default border.
So you picked the wrong line of the 2 to copy, try:
Code: Select all
SetWindowLongPtr_(GadgetID(#Scnt), #GWL_EXSTYLE, GetWindowLongPtr_(GadgetID(#Scnt), #GWL_EXSTYLE) & ~#WS_EX_CLIENTEDGE)
Re: Change colour or remove Scintilla Gadget Border
Hi IV
How about the very famous method
Should be cross platform as well
And variety of Borders too
How about the very famous method
Should be cross platform as well
And variety of Borders too
Code: Select all
If OpenWindow(0, 0, 0, 330, 90, "ScintillaGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If InitScintilla()
ContainerGadget(10,10,10,310, 70,#PB_Container_Flat)
ScintillaGadget(0, -2, -2, 310, 70, 0)
CloseGadgetList()
; Output set to red color
ScintillaSendMessage(0, #SCI_STYLESETFORE, 0, RGB(255, 0, 0))
; Set the initial text to the ScintillaGadget
*Text=UTF8("This is a simple ScintillaGadget with text...")
ScintillaSendMessage(0, #SCI_SETTEXT, 0, *Text)
FreeMemory(*Text) ; The buffer made by UTF8() has to be freed, to avoid memory leak
; Adding a second line of text with linebreak before
Text$ = Chr(10) + "Second line"
*Text=UTF8(Text$)
ScintillaSendMessage(0, #SCI_APPENDTEXT, Len(Text$), *Text)
FreeMemory(*Text)
EndIf
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
Egypt my love
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: Change colour or remove Scintilla Gadget Border
Hi Kenmo
50-50 chance...... yes, the correct one works perfectly
Hi Rashad
I actually already used that method. It gets tricky when a scrollbar auto-displays, so on this occasion the API solution is best.
50-50 chance...... yes, the correct one works perfectly
Hi Rashad
I actually already used that method. It gets tricky when a scrollbar auto-displays, so on this occasion the API solution is best.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.