 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Do you want HiEdit internaly |
| Yes |
|
45% |
[ 20 ] |
| No, I like Edit control |
|
27% |
[ 12 ] |
| Other (please explain) |
|
27% |
[ 12 ] |
|
| Total Votes : 44 |
|
| Author |
Message |
TodWulff
Joined: 29 Dec 2007 Posts: 99
|
Posted: Sat Apr 26, 2008 8:54 am Post subject: WOO HOO!!! |
|
|
Hey majkinetor.
Kudos on your wrapper.
Here are some images that show the implementation of the HiEdit control in my ARMbasic IDE for Coridium Corp's MicroController Product Line.
I blended the guidance that I took from corrupt's cRichEdit control and was able to embed a couple of the HiEdit Controls onto a AHK tab control.
On the first tab, I disabled the HiEdit tabs and am using it as a normal edit control, that gives syntax highlighting.
On the 2nd AHK tab, I have a tab'd HiEdit control that allows the user to look at the toolchain dialogue in the various tabs.
I am posting, in addition to saying thanks for the work, to ask a question.
With the control being on a couple of tabs, when I switch tabs, I am seeing where the sub-controls on the tabs aren't being redrawn properly. Is there a message that I can send to the control to get it to redraw all of it's elements?
Here is a pic of the ide with the console tab selected - the IDE is docked inside of the editor:
Here is a pic showing the docked IDE looking at the preprocessor debug dialog:
Here is a pic showing an undocked IDE with the issue I am seeing with the elements not being re-drawn properly:
Here is a pic showing what the same display should look like (when I resize the container, I have the gui destroyed and re-created which results in the proper display of the sub-controls on the HiEdit control).
And here is another pic looking at the preprocessed source before it gets handed off to the compiler. Basically looking at the 2nd tab on the 2nd tab. Embedded controls rule...:
At any rate, please review and advise if you have any suggestions for programmatically forcing a redraw on AHK tab control selection.
Thank you!
-t
p.s. for anyone else wanting to embed a HiEdit onto a set of AHK tab controls, here' s some code showing how I did it:
| Code: |
...
Gui, Add, Tab2, x%localx% y%localy% w%localw% h%localh% Bottom, Console|ToolChain Dialog
gui tab, 1
...
local := toolsw-60
local2 := toolsh-92
Gui, Add, Picture, x15 y37 w%local% h%local2% HwndConsoleParent ; for adding Control to tabs
Console := HE_Add(ConsoleParent,0,0,local,local2, "VSCROLL HILIGHT", A_ScriptDir "\Resources\HiEdit.dll")
colors=
(
Text = 0x0
Back = 0xc5c5c5
SelText = 0xFFFFFF
ActSelBack = 0xc56a31
InSelBack = 0xAAAAAA
LineNumber = 0x0
SelBarBack = 0x999999
NonPrintableBack = 0xFFFFFF
Number = 0x0
)
HE_SetColors(Console, colors)
HE_LineNumbersBar(Console, "show",0,10)
fStyle := "s11"
fFace := "Monospac821 BT"
HE_SetFont( Console, fStyle "," fFace)
HE_SetKeywordFile( A_ScriptDir "\Resources\ARMbasic.syn")
...
gui tab, 2
Gui, Add, Picture, x10 y10 w%local% h%local2% HwndToolChainDialogParent
ToolChainDialog := HE_Add(ToolChainDialogParent,0,0,local,local2, "HSCROLL VSCROLL HILIGHT TABBEDHRZSB FILECHANGEALERT", A_ScriptDir "\Resources\HiEdit.dll")
colors=
(
Text = 0x0
Back = 0xc5c5c5
SelText = 0xFFFFFF
ActSelBack = 0xc56a31
InSelBack = 0xAAAAAA
LineNumber = 0x0
SelBarBack = 0x999999
NonPrintableBack = 0xFFFFFF
Number = 0x0
)
HE_SetColors(ToolChainDialog, colors)
HE_LineNumbersBar(ToolChainDialog)
fStyle := "s8"
fFace := "Monospac821 BT"
HE_SetFont( ToolChainDialog, fStyle "," fFace)
HE_SetKeywordFile( A_ScriptDir "\Resources\ARMbasic.syn")
HE_OpenFile(ToolChainDialog, "C:\Program Files\Coridium\temp\__tgthex.tmp")
HE_OpenFile(ToolChainDialog, "C:\Program Files\Coridium\temp\__cmperr.tmp")
HE_OpenFile(ToolChainDialog, "C:\Program Files\Coridium\temp\__temp.bas")
HE_OpenFile(ToolChainDialog, "C:\Program Files\Coridium\temp\__temp.bpp")
HE_OpenFile(ToolChainDialog, "C:\Program Files\Coridium\temp\__cppout.tmp")
...
|
_________________ When replying, please feel free to address me as Tod or t. My AHK.net site... |
|
| Back to top |
|
 |
TodWulff
Joined: 29 Dec 2007 Posts: 99
|
Posted: Sat Apr 26, 2008 7:17 pm Post subject: |
|
|
Also, the .rar archive for the toolset has a typo in the library file HiEdit.ahk. On line 280, the word ...length is mis-spelled.
| Quote: | ;----------------------------------------------------------------------------------------------------
; Function: GetTextLenght
; Returns the length of text, in characters.
;
HE_GetTextLenght(hEdit) {
static WM_GETTEXTLENGTH=14
SendMessage, WM_GETTEXTLENGTH, 0, 0,, ahk_id %hEdit%
Return ErrorLevel
}
;----------------------------------------------------------------------------------------------------
|
And there appear to be 3 other references within the lib file where it is also mis-spelled.?.
This messed with da noodle in me noggin for a bit, as the guidance on the ahk.net site for the control shows it spelled properly...  _________________ When replying, please feel free to address me as Tod or t. My AHK.net site... |
|
| Back to top |
|
 |
majkinetor! Guest
|
Posted: Sun Apr 27, 2008 8:00 pm Post subject: |
|
|
I thought i fixed that typo....
| Quote: | | At any rate, please review and advise if you have any suggestions for programmatically forcing a redraw on AHK tab control selection. |
Try Redraw function in ComboX module. if you have problems with redraws. |
|
| Back to top |
|
 |
TodWulff
Joined: 29 Dec 2007 Posts: 99
|
Posted: Mon Apr 28, 2008 10:38 pm Post subject: |
|
|
Hi Majkinetor.
Thanks for the suggestion.
We (well, honestly, not even me, just akyprian) have figured out what is going on. Take a peek at the 4th post+ on here.
It seems to be related to a line of code in your wrapper.
I implemented the fix he suggested, and it surely does resolve the problem.
Just wanted to let you know, in case there wasn't a good reason that the wrapper included the offending syntax. If it was indeed intentional, I'd be interested in knowing the reasoning, so that I can learn yet some more.
Again, thanks.
Take care.
-t _________________ When replying, please feel free to address me as Tod or t. My AHK.net site... |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3544 Location: Belgrade
|
Posted: Tue Apr 29, 2008 9:14 pm Post subject: |
|
|
| Quote: | | It seems to be related to a line of code in your wrapper. |
There are some redrawing problems but with other controls I wrapped, i didn't encounter them with HiEdit.
I will see what i can do with your problem. _________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|